new goog.date.Interval(0, 1) // One month new goog.date.Interval(0, 0, 3, 1) // Three days and one hour new goog.date.Interval(goog.date.Interval.DAYS, 1) // One day
![]()
Constants for months.
Constants:
|
Code » | |||||||||||||
![]()
Constants for weekdays.
Constants:
|
Code » |
Formats a month/year string.
Example: "January 2008"
|
code » | ||||||
Creates a DateTime from a datetime string expressed in ISO 8601 format.
Arguments:
Returns: goog.date.DateTime
Parsed date or null if parse fails.
|
code » | ||||||
Returns the number of days for a given month.
|
code » | ||||||
Static function for week number calculation. ISO 8601 implementation.
Arguments:
Returns: number
The week number (1-53).
|
code » | ||||||
Returns whether the given year is a leap year.
|
code » | ||||||
Returns whether the given year is a long ISO year.
See
http://www.phys.uu.nl/~vgent/calendar/isocalendar_text3.htm .
|
code » | ||||||
Returns true if the 2 dates are in the same day.
Arguments:
Returns: boolean
Whether the dates are on the same day.
|
code » | ||||||
Returns true if the 2 dates are in the same month.
Arguments:
Returns: boolean
Whether the dates are in the same calendar month.
|
code » | ||||||
Returns true if the 2 dates are in the same year.
Arguments:
Returns: boolean
Whether the dates are in the same calendar year.
|
code » | ||||||
![]()
No description.
Arguments:
Returns: !(T | S)
The later of them in time.
|
code » | ||||||
![]()
No description.
Arguments:
Returns: !(T | S)
The earlier of them in time.
|
code » | ||||||
![]()
Sets date fields based on an ISO 8601 week string.
See
http://en.wikipedia.org/wiki/ISO_week_date , "Relation with the
Gregorian Calendar". The first week of a new ISO year is the week with the
majority of its days in the new Gregorian year. I.e., ISO Week 1's Thursday
is in that year. ISO weeks always start on Monday. So ISO Week 1 can
contain a few days from the previous Gregorian year. And ISO weeks always
end on Sunday, so the last ISO week (Week 52 or 53) can have a few days from
the following Gregorian year.
Example: '1997-W01' lasts from 1996-12-30 to 1997-01-05. January 1, 1997 is
a Wednesday. So W01's Monday is Dec.30, 1996, and Sunday is January 5, 1997.
Arguments:
|
code » | ||||||
Sets date fields based on an ISO 8601 format string.
Arguments:
Returns: boolean
Whether the parsing succeeded.
|
code » | ||||||
Parses a datetime string expressed in ISO 8601 format. Overwrites the date
and optionally the time part of the given object with the parsed values.
Arguments:
Returns: boolean
Whether the parsing succeeded.
|
code » | ||||||
Sets time fields based on an ISO 8601 format string.
Note: only time fields, not date fields.
Arguments:
Returns: boolean
Whether the parsing succeeded.
|
code » |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Regular expression for splitting date parts from ISO 8601 styled string.
Examples: '20060210' or '2005-02-22' or '20050222' or '2005-08'
or '2005-W22' or '2005W22' or '2005-W22-4', etc.
For explanation and more examples, see:
http://en.wikipedia.org/wiki/ISO_8601
|
Code » | |
![]()
Regular expression for splitting duration parts from ISO 8601 styled string.
Example: '-P1Y2M3DT4H5M6.7S'
|
Code » | |
![]()
Regular expression for splitting time parts from ISO 8601 styled string.
Examples: '18:46:39.994' or '184639.994'
|
Code » | |
![]()
Regular expression for splitting timezone parts from ISO 8601 styled string.
Example: The part after the '+' in '18:46:39+07:00'. Or '09:30Z' (UTC).
|
Code » |