daterange.js
No description.

File Location

/goog/date/daterange.js

Classes

goog.date.DateRange
Constructs a date range.
goog.date.DateRange.Iterator
Creates an iterator over the dates in a goog.date.DateRange.

Public Protected Private

Enumerations

Global Functions

goog.date.DateRange.allTime(opt_today) !goog.date.DateRange
Returns the range that includes all days between January 1, 1900 and December 31, 9999.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The range that includes all days between January 1, 1900 and December 31, 9999.
code »
goog.date.DateRange.cloneOrCreate_(opt_today) !goog.date.Date
Clones or creates new.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.Date  cloned or new.
code »
goog.date.DateRange.currentOrLastMonday_(date) !goog.date.Date
Calculates the Monday before a date. If the input is a Monday, returns the input. Does not modify its input.
Arguments:
date : goog.date.Date
The input date.
Returns: !goog.date.Date  If |date| is a Monday, return |date|; otherwise return the Monday before |date|.
code »
goog.date.DateRange.equals(ab) boolean
Tests two goog.date.DateRange objects for equality.
Arguments:
a : goog.date.DateRange
A date range.
b : goog.date.DateRange
A date range.
Returns: boolean  Whether |a| is the same range as |b|.
code »
goog.date.DateRange.last7Days(opt_today) !goog.date.DateRange
Returns the range that includes the seven days that end yesterday.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The range that includes the seven days that end yesterday.
code »
goog.date.DateRange.lastBusinessWeek(opt_today) !goog.date.DateRange
Returns the range that starts seven days before the Monday on or before today and ends the Friday before today.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The range that starts seven days before the Monday on or before today and ends the Friday before today.
code »
goog.date.DateRange.lastMonth(opt_today) !goog.date.DateRange
Returns the range that starts the first of last month and ends the last day of last month.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The range that starts the first of last month and ends the last day of last month.
code »
goog.date.DateRange.lastWeek(opt_today) !goog.date.DateRange
Returns the seven-day range that ends the day before the first day of the week (see goog.i18n.DateTimeSymbols.FIRSTDAYOFWEEK) that contains today.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The range that starts seven days before the Monday on or before today and ends the Sunday on or before yesterday.
code »
goog.date.DateRange.offsetInDays_(dateoffset) !goog.date.Date
Calculates a date that is a number of days after a date. Does not modify its input.
Arguments:
date : goog.date.Date
The input date.
offset : number
Number of days.
Returns: !goog.date.Date  The date that is |offset| days after |date|.
code »
goog.date.DateRange.offsetInMonths_(dateoffset) !goog.date.Date
Calculates a date that is a number of months after the first day in the month that contains its input. Does not modify its input.
Arguments:
date : goog.date.Date
The input date.
offset : number
Number of months.
Returns: !goog.date.Date  The date that is |offset| months after the first day in the month that contains |date|.
code »
goog.date.DateRange.standardDateRange(dateRangeKeyopt_today) !goog.date.DateRange
No description.
Arguments:
dateRangeKey : string
A standard date range key.
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The date range that corresponds to that key.
code »
goog.date.DateRange.thisMonth(opt_today) !goog.date.DateRange
Returns the range that starts the first of this month and ends the last day of this month.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The range that starts the first of this month and ends the last day of this month.
code »
goog.date.DateRange.thisWeek(opt_today) !goog.date.DateRange
Returns the seven-day range that starts on the first day of the week (see goog.i18n.DateTimeSymbols.FIRSTDAYOFWEEK) on or before today.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The range that starts the Monday on or before today and ends the Sunday on or after today.
code »
goog.date.DateRange.today(opt_today) !goog.date.DateRange
Returns the range from today to today.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The range that includes only today.
code »
goog.date.DateRange.yesterday(opt_today) !goog.date.DateRange
Returns the range from yesterday to yesterday.
Arguments:
opt_today : goog.date.Date=
The date to consider today. Defaults to today.
Returns: !goog.date.DateRange  The range that includes only yesterday.
code »

Directory date

File Reference