| goog.date.Date |
| goog.date.UtcDateTime | goog.date.DateTime |
| goog.date.DateTime | goog.date.Date |
|
opt_year
:
Four digit year or a date-like object. If not set, the created object will contain the date determined by goog.now().
|
|
opt_month
:
Month, 0 = Jan, 11 = Dec.
|
|
opt_date
:
Date of month, 1 - 31.
|
add(interval)
Performs date calculation by adding the supplied interval to the date.
Arguments:
|
code » | |||
|
No description.
Returns:
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:
Whether the given date is equal to this one.
|
code » | |||
|
No description.
Returns:
The date of month.
|
code » | |||
|
No description.
Returns:
goog.date.weekDay.<number>
The day of week, US style. 0 = Sun, 6 = Sat.
|
code » | |||
|
No description.
Returns:
The day of year.
|
code » | |||
|
No description.
Returns:
The first day of the week. 0 = Mon, 6 = Sun.
|
code » | |||
|
No description.
Returns:
The cut off weekday used for week number calculations. 0 = Mon, 6 = Sun.
|
code » | |||
|
No description.
Returns:
The four digit year of date.
|
code » | |||
|
No description.
Returns:
The day of week, ISO style. 0 = Mon, 6 = Sun.
|
code » | |||
|
No description.
Returns:
goog.date.month.<number>
The month of date, 0 = Jan, 11 = Dec.
|
code » | |||
|
No description.
Returns:
The number of days for the selected month.
|
code » | |||
|
Returns the number of milliseconds since 1 January 1970 00:00:00.
Returns:
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:
The timezone offset.
|
code » | |||
|
Returns timezone offset as a string. Returns offset in [+-]HH:mm format or Z
for UTC.
Returns:
The timezone offset as a string.
|
code » | |||
|
No description.
Returns:
The date of month according to universal time.
|
code » | |||
|
No description.
Returns:
goog.date.weekDay.<number>
The day of week according to universal time, US style. 0 = Sun, 1 = Mon, 6 = Sat.
|
code » | |||
|
No description.
Returns:
The four digit year of date according to universal time.
|
code » | |||
|
No description.
Returns:
The hours value according to universal time.
|
code » | |||
|
No description.
Returns:
The day of week according to universal time, ISO style. 0 = Mon, 6 = Sun.
|
code » | |||
|
No description.
Returns:
The hours value according to universal time.
|
code » | |||
|
No description.
Returns:
goog.date.month.<number>
The month of date according to universal time, 0 = Jan, 11 = Dec.
|
code » | |||
|
No description.
Returns:
The day of week according to universal time and firstDayOfWeek setting.
|
code » | |||
|
No description.
Returns:
The week number.
|
code » | |||
|
No description.
Returns:
The day of week according to firstDayOfWeek setting.
|
code » | |||
|
Alias for getFullYear.
Returns:
The four digit year of date.
|
code » | |||
maybeFixDst_(expected)
Fixes date to account for daylight savings time in browsers that fail to do
so automatically.
Arguments:
|
code » | |||
set(date)
Sets the date.
Arguments:
|
code » | |||
setDate(date)
Sets the day part of the date.
Arguments:
|
code » | |||
setFirstDayOfWeek(day)
Sets the first day of week.
Arguments:
|
code » | |||
setFirstWeekCutOffDay(day)
Sets cut off weekday used for week number calculations. 0 = Mon, 6 = Sun.
Arguments:
|
code » | |||
setFullYear(year)
Sets the year part of the date.
Arguments:
|
code » | |||
setMonth(month)
Sets the month part of the date.
TODO(user): Update type to goog.date.month.
Arguments:
|
code » | |||
setTime(ms)
Sets the value of the date object as expressed in the number of milliseconds
since 1 January 1970 00:00:00.
Arguments:
|
code » | |||
setUTCDate(date)
Sets the day part of the date according to universal time.
Arguments:
|
code » | |||
setUTCFullYear(year)
Sets the year part of the date according to universal time.
Arguments:
|
code » | |||
setUTCMonth(month)
Sets the month part of the date according to universal time.
Arguments:
|
code » | |||
setYear(year)
Alias for setFullYear.
Arguments:
|
code » | |||
|
Returns ISO 8601 string representation of date.
|
code » | |||
|
Overloaded toString method for object.
Returns:
ISO 8601 string representation of date.
|
code » | |||
|
Returns ISO 8601 string representation of date according to universal time.
Arguments:
Returns:
ISO 8601 string representation of date according to universal time.
|
code » | |||
|
No description.
Returns:
Value of wrapped date.
|
code » |
|
Compares two dates. May be used as a sorting function.
Arguments:
Returns:
Comparison result. 0 if dates are the same, less than 0 if date1 is earlier than date2, greater than 0 if date1 is later than date2.
|
code » |