goog.date.Date | |
goog.date.DateTime | goog.date.Date |
goog.date.UtcDateTime | goog.date.DateTime |
opt_year
: number | Object=
Four digit year or a date-like object. If
not set, the created object will contain the date determined by
goog.now().
|
opt_month
: number=
Month, 0 = Jan, 11 = Dec.
|
opt_date
: number=
Date of month, 1 - 31.
|
opt_hours
: number=
Hours, 0 - 24.
|
opt_minutes
: number=
Minutes, 0 - 59.
|
opt_seconds
: number=
Seconds, 0 - 61.
|
opt_milliseconds
: number=
Milliseconds, 0 - 999.
|
![]()
Performs date calculation by adding the supplied interval to the date.
Arguments:
|
code » | ||||
No description.
Returns: !goog.date.DateTime
A clone of the datetime object.
|
code » | ||||
Tests whether given datetime is exactly equal to this DateTime.
Arguments:
Returns: boolean
Whether the given datetime is exactly equal to this one.
|
code » | ||||
Returns the hours part of the datetime.
Returns: number
An integer between 0 and 23, representing the hour.
|
code » | ||||
Returns the milliseconds part of the datetime.
Returns: number
An integer between 0 and 999, representing the milliseconds.
|
code » | ||||
Returns the minutes part of the datetime.
Returns: number
An integer between 0 and 59, representing the minutes.
|
code » | ||||
Returns the seconds part of the datetime.
Returns: number
An integer between 0 and 59, representing the seconds.
|
code » | ||||
![]()
Returns the day of week according to universal time, US style.
Returns: goog.date.weekDay
Day of week, 0 = Sun, 1 = Mon, 6 = Sat.
|
code » | ||||
Returns the hours part of the datetime according to universal time.
Returns: number
An integer between 0 and 23, representing the hour.
|
code » | ||||
Returns the milliseconds part of the datetime according to universal time.
Returns: number
An integer between 0 and 999, representing the milliseconds.
|
code » | ||||
Returns the minutes part of the datetime according to universal time.
Returns: number
An integer between 0 and 59, representing the minutes.
|
code » | ||||
Returns the seconds part of the datetime according to universal time.
Returns: number
An integer between 0 and 59, representing the seconds.
|
code » | ||||
No description.
Returns: boolean
Whether the datetime is aligned to midnight.
|
code » | ||||
![]()
Sets the hours part of the datetime.
Arguments:
|
code » | ||||
![]()
Sets the seconds part of the datetime.
Arguments:
|
code » | ||||
![]()
Sets the minutes part of the datetime.
Arguments:
|
code » | ||||
![]()
Sets the seconds part of the datetime.
Arguments:
|
code » | ||||
![]()
Sets the hours part of the datetime according to universal time.
Arguments:
|
code » | ||||
![]()
Sets the seconds part of the datetime according to universal time.
Arguments:
|
code » | ||||
![]()
Sets the minutes part of the datetime according to universal time.
Arguments:
|
code » | ||||
![]()
Sets the seconds part of the datetime according to universal time.
Arguments:
|
code » | ||||
Returns ISO 8601 string representation of date/time.
Arguments:
Returns: string
ISO 8601 string representation of date/time.
|
code » | ||||
Generates time label for the datetime in standard ISO 24-hour time format.
E.g., '06:00:00' or '23:30:15'.
Arguments:
Returns: string
The time label.
|
code » | ||||
Overloaded toString method for object.
Returns: string
ISO 8601 string representation of date/time.
|
code » | ||||
Returns ISO 8601 string representation of date/time according to universal
time.
Arguments:
Returns: string
ISO 8601 string representation of date/time according to
universal time.
|
code » | ||||
Generates time label for the datetime, e.g., '5:30am'.
By default this does not pad hours (e.g., to '05:30') and it does add
an am/pm suffix.
TODO(user): i18n -- hardcoding time format like this is bad. E.g., in CJK
locales, need Chinese characters for hour and minute units.
Arguments:
Returns: string
The time label.
|
code » | ||||
Returns XML Schema 2 string representation of date/time.
The return value is also ISO 8601 compliant.
Arguments:
Returns: string
XML Schema 2 string representation of date/time.
|
code » |
![]()
Performs date calculation by adding the supplied interval to the date.
Arguments:
|
code » | |||
new Date(y, m, d) treats years in the interval [0, 100) as two digit years,
adding 1900 to them. This method ensures that calling the date constructor
as a copy constructor returns a value that is equal to the passed in
date value by explicitly setting the full year.
|
code » | |||
No description.
Returns: !goog.date.Date
A clone of the date object.
|
code » | |||
Tests whether given date is equal to this Date.
Note: This ignores units more precise than days (hours and below)
and also ignores timezone considerations.
Arguments:
Returns: boolean
Whether the given date is equal to this one.
|
code » | |||
No description.
Returns: number
The date of month.
|
code » | |||
![]()
No description.
Returns: goog.date.weekDay
The day of week, US style. 0 = Sun, 6 = Sat.
|
code » | |||
No description.
Returns: number
The day of year.
|
code » | |||
No description.
Returns: number
The first day of the week. 0 = Mon, 6 = Sun.
|
code » | |||
No description.
Returns: number
The cut off weekday used for week number calculations.
0 = Mon, 6 = Sun.
|
code » | |||
No description.
Returns: number
The four digit year of date.
|
code » | |||
No description.
Returns: number
The day of week, ISO style. 0 = Mon, 6 = Sun.
|
code » | |||
![]()
No description.
Returns: goog.date.month
The month of date, 0 = Jan, 11 = Dec.
|
code » | |||
No description.
Returns: number
The number of days for the selected month.
|
code » | |||
Returns the number of milliseconds since 1 January 1970 00:00:00.
Returns: number
The number of milliseconds since 1 January 1970 00:00:00.
|
code » | |||
Returns timezone offset. The timezone offset is the delta in minutes between
UTC and your local time. E.g., UTC+10 returns -600. Daylight savings time
prevents this value from being constant.
Returns: number
The timezone offset.
|
code » | |||
Returns timezone offset as a string. Returns offset in [+-]HH:mm format or Z
for UTC.
Returns: string
The timezone offset as a string.
|
code » | |||
No description.
Returns: number
The date of month according to universal time.
|
code » | |||
![]()
No description.
Returns: goog.date.weekDay
The day of week according to universal time,
US style. 0 = Sun, 1 = Mon, 6 = Sat.
|
code » | |||
No description.
Returns: number
The four digit year of date according to universal time.
|
code » | |||
No description.
Returns: number
The hours value according to universal time.
|
code » | |||
No description.
Returns: number
The day of week according to universal time, ISO style.
0 = Mon, 6 = Sun.
|
code » | |||
No description.
Returns: number
The hours value according to universal time.
|
code » | |||
![]()
No description.
Returns: goog.date.month
The month of date according to universal time,
0 = Jan, 11 = Dec.
|
code » | |||
No description.
Returns: number
The day of week according to universal time and
firstDayOfWeek setting.
|
code » | |||
No description.
Returns: number
The week number.
|
code » | |||
No description.
Returns: number
The day of week according to firstDayOfWeek setting.
|
code » | |||
Alias for getFullYear.
Returns: number
The four digit year of date.
|
code » | |||
![]()
Fixes date to account for daylight savings time in browsers that fail to do
so automatically.
Arguments:
|
code » | |||
![]()
Sets the date.
Arguments:
|
code » | |||
![]()
Sets the day part of the date.
Arguments:
|
code » | |||
![]()
Sets the first day of week.
Arguments:
|
code » | |||
![]()
Sets cut off weekday used for week number calculations. 0 = Mon, 6 = Sun.
Arguments:
|
code » | |||
![]()
Sets the year part of the date.
Arguments:
|
code » | |||
![]()
Sets the month part of the date.
TODO(nnaze): Update type to goog.date.month.
Arguments:
|
code » | |||
![]()
Sets the value of the date object as expressed in the number of milliseconds
since 1 January 1970 00:00:00.
Arguments:
|
code » | |||
![]()
Sets the day part of the date according to universal time.
Arguments:
|
code » | |||
![]()
Sets the year part of the date according to universal time.
Arguments:
|
code » | |||
![]()
Sets the month part of the date according to universal time.
Arguments:
|
code » | |||
![]()
Alias for setFullYear.
Arguments:
|
code » | |||
Returns ISO 8601 string representation of date.
Arguments:
Returns: string
ISO 8601 string representation of date.
|
code » | |||
Overloaded toString method for object.
Returns: string
ISO 8601 string representation of date.
|
code » | |||
Returns ISO 8601 string representation of date according to universal time.
Arguments:
Returns: string
ISO 8601 string representation of date according to
universal time.
|
code » | |||
No description.
Returns: number
Value of wrapped date.
|
code » |
![]()
No description.
|
Code » |
Creates a DateTime from a datetime string expressed in RFC 822 format.
Arguments:
Returns: goog.date.DateTime
Parsed date or null if parse fails.
|
code » | ||
No description.
Arguments:
|
code » |
![]()
No description.
|
Code » |