class Date
this
date into a string.this
date.this
date.this
date.this
date.this
date.this
date.this
date.this
date.this
date.this
date. Date clone()
this
date, creating a new instance.
this
date.
Date datePart()
this
date.
The time for the new date will be midnight.
format(string p, l)
this
date into a string.
For pattern syntax, see java.text.SimpleDateFormat.
p
- the pattern string of formatl
- the language (string) or locationzation data used number getDayOfWeek([ o])
[o]
- first day of week number, language string or localization object. number getDayOfYear()
this
date.
number getDaysInMonth()
this
date.
number getDaysInYear()
this
date.
number getWeekOfMonth([ l])
this
date.
[l]
- language string or localization object. number getWeekOfYear([ l])
this
date.
[l]
- language string or localization object. number getWeeksInYear()
this
date.
static object i18n([string l])
Standard localizations included:
A good source of localization data are http://www.unicode.org/cldr/.
[l]
- language, or user-agent language if omitted.static Date parse([string p], [ l])
parse
but
reverts back to the original if p
is omitted.
For pattern syntax, see java.text.SimpleDateFormat.
[p]
- the pattern string of format.[l]
- the language (string) or locationzation data used.NaN
on failure.
setDay(number d)
d
- the weekday (0-6). setDayOfWeek(number d, [ o])
d
- the weekday (1-7).[o]
- first day of week number, language string or localization object. setDayOfYear(number d)
this
date.
d
- the day of year (1-366). setTimezoneOffset(number o)
this
date.
This function only adjusts the date to the supplied offset, it doesn’t actually set the timezone.
o
- offset in minutes. setWeekOfMonth(number w, [ l])
this
date.
w
- the week number of this month (1-6).[l]
- language string or localization object. setWeekOfYear(number w, [ l])
this
date.
w
- the week number in this year, 1-53.[l]
- language string or localization object. Date timePart()
this
date.
The date will be the JavaScript epoc (1970-01-01).
this
date.
static Date today()
Date
instance for todays date, with time at midnight.
Date
class with additional functionality.Many of the date arithmetics are based on the information from http://www.merlyn.demon.co.uk/frames-1.htm.