Class JSDate
- java.lang.Object
-
- org.fife.rsta.ac.js.ecma.api.ecma3.JSDate
-
- All Implemented Interfaces:
JSDateFunctions,JSObjectFunctions
- Direct Known Subclasses:
JS5Date
public abstract class JSDate extends java.lang.Object implements JSDateFunctions
Object Date- Since:
- Standard ECMA-262 3rd. Edition
-
-
Field Summary
Fields Modifier and Type Field Description protected JSFunctionconstructorproperty constructorJSDateprototypeproperty prototype
-
Constructor Summary
Constructors Constructor Description JSDate()Object Date()JSDate(JSNumber milliseconds)Object Date(milliseconds)JSDate(JSNumber year, JSNumber month, JSNumber day, JSNumber hours, JSNumber minutes, JSNumber seconds, JSNumber ms)Object Date(year, month, day, hours, minutes, seconds, ms)JSDate(JSString datestring)Object Date(datestring)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JSNumberparse(JSString string)function parse(string) parse a date/time string.static JSNumberUTC(JSNumber year, JSNumber month, JSNumber day, JSNumber hour, JSNumber min, JSNumber sec, JSNumber ms)function UTC(year,month,day,hour,min,sec,ms) Converts a Date specification to milliseconds.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fife.rsta.ac.js.ecma.api.ecma3.functions.JSDateFunctions
getDate, getDay, getFullYear, getHours, getMilliseconds, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getUTCDate, getUTCDay, getUTCFullYear, getUTCHours, getUTCMilliseconds, getUTCMinutes, getUTCMonth, getUTCSeconds, setDate, setFullYear, setHours, setMilliseconds, setMinutes, setMonth, setSeconds, setTime, setUTCDate, setUTCFullYear, setUTCHours, setUTCMilliseconds, setUTCMinute, setUTCMonth, setUTCSeconds, toDateString, toLocaleDateString, toLocaleString, toLocaleTimeString, toTimeString, toUTCString, valueOf
-
Methods inherited from interface org.fife.rsta.ac.js.ecma.api.ecma3.functions.JSObjectFunctions
hasOwnProperty, isPrototypeOf, propertyIsEnumerable, toString
-
-
-
-
Field Detail
-
prototype
public JSDate prototype
property prototype- Since:
- Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
- See Also:
Date
-
constructor
protected JSFunction constructor
property constructor- Since:
- Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
- See Also:
Function
-
-
Constructor Detail
-
JSDate
public JSDate()
Object Date()Creates a Date object set to the current date and time.
- Since:
- Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
-
JSDate
public JSDate(JSNumber milliseconds)
Object Date(milliseconds)- Parameters:
milliseconds- The number of milliseconds between the desired date and midnight January 1, 1970 (UTC).- Since:
- Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
-
JSDate
public JSDate(JSString datestring)
Object Date(datestring)- Parameters:
datestring- A single argument that specifies date and optionally, the time as a string. The string should be in a format accepted by Date.parse()- Since:
- Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
-
JSDate
public JSDate(JSNumber year, JSNumber month, JSNumber day, JSNumber hours, JSNumber minutes, JSNumber seconds, JSNumber ms)
Object Date(year, month, day, hours, minutes, seconds, ms)- Parameters:
year- The year in a four digit format. e.g. 2011 for the year 2011month- The month specified as a single integer from 0 (January) to 11 (December)day- The day of the month as an integer between 1 and 31.hours- Optional hour value, specified as an integer from 0 (midnight) to 23 (11pm).minutes- Optional minute value, specified as an integer from 0 to 59.seconds- Optional second value, specified as an integer from 0 to 59.ms- Optional milliseconds value, specified as an integer from 0 to 999.- Since:
- Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
-
-
Method Detail
-
UTC
public static JSNumber UTC(JSNumber year, JSNumber month, JSNumber day, JSNumber hour, JSNumber min, JSNumber sec, JSNumber ms)
function UTC(year,month,day,hour,min,sec,ms) Converts a Date specification to milliseconds.- Parameters:
year- The year in four digit format. If the year is added between 0 and 99, then 1900 is added to it.month- The month specified from 0 (January) to 11 (December).day- The day in the month between 1 and 31.hour- The hour specified from 0 (midnight) and 23 (11 p.m).min- The minutes in the hour, specified from 0 to 59.sec- The seconds in the minute, specified from 0 to 59.ms- The milliseconds within the second, specified from 0 to 999.- Since:
- Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
- See Also:
Date,parse()
-
-