Home

# Class goog.date.DateRange

Constructs a date range.

Instance Method Summary
| `getEndDate() ⇒ ?goog.date.Date`
| `getStartDate() ⇒ ?goog.date.Date`
| `iterator() ⇒ ?goog.iter.Iterator`

Static Method Summary
| `allTime(?goog.date.Date= opt_today) ⇒ ?goog.date.DateRange` Returns the range that includes all days between January 1, 1900 and December 31, 9999.
| `cloneOrCreate_(?goog.date.Date= opt_today) ⇒ !goog.date.Date` Clones or creates new.
| `currentOrLastMonday_(?goog.date.Date date) ⇒ ?goog.date.Date` Calculates the Monday before a date. If the input is a Monday, returns the input. Does not modify its input.
| `equals(?goog.date.DateRange a, ?goog.date.DateRange b) ⇒ boolean` Tests two {@link goog.date.DateRange} objects for equality.
| `last7Days(?goog.date.Date= opt_today) ⇒ ?goog.date.DateRange` Returns the range that includes the seven days that end yesterday.
| `lastBusinessWeek(?goog.date.Date= 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.
| `lastMonth(?goog.date.Date= opt_today) ⇒ ?goog.date.DateRange` Returns the range that starts the first of last month and ends the last day of last month.
| `lastWeek(?goog.date.Date= opt_today) ⇒ ?goog.date.DateRange` Returns the seven-day range that ends the day before the first day of the week (see {@link goog.i18n.DateTimeSymbols.FIRSTDAYOFWEEK}) that contains today.
| `offsetInDays_(?goog.date.Date date, number offset) ⇒ ?goog.date.Date` Calculates a date that is a number of days after a date. Does not modify its input.
| `offsetInMonths_(?goog.date.Date date, number offset) ⇒ ?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.
| `standardDateRange(string dateRangeKey, ?goog.date.Date= opt_today) ⇒ ?goog.date.DateRange`
| `thisMonth(?goog.date.Date= opt_today) ⇒ ?goog.date.DateRange` Returns the range that starts the first of this month and ends the last day of this month.
| `thisWeek(?goog.date.Date= opt_today) ⇒ ?goog.date.DateRange` Returns the seven-day range that starts on the first day of the week (see {@link goog.i18n.DateTimeSymbols.FIRSTDAYOFWEEK}) on or before today.
| `today(?goog.date.Date= opt_today) ⇒ ?goog.date.DateRange` Returns the range from today to today.
| `yesterday(?goog.date.Date= opt_today) ⇒ ?goog.date.DateRange` Returns the range from yesterday to yesterday.