dojox.calendar.time
Object » dojox.calendar.time
dojo.require("dojox.calendar.time");
Defined in dojox.calendar/time.js
Advanced date manipulation utilities.
Method Summary
- floor(date, unit, steps, reuse, dateClassObj) floors the date to the unit.
- floorToDay(d, reuse, dateClassObj) Floors the specified date to the start of day. date: Date The date to floor.
- floorToMonth(d, reuse, dateClassObj) Floors the specified date to the start of the date's month. date: Date The date to floor.
- floorToWeek(d, dateClassObj, dateFuncObj, firstDayOfWeek, locale) Floors the specified date to the beginning of week.
- isStartOfDay(d, dateClassObj, dateFuncObj) Tests if the specified date represents the starts of day.
- isToday(d, dateClassObj) Returns whether the specified date is in the current day.
- newDate(obj, dateClassObj) Creates a new Date object.
Methods
Date
floors the date to the unit.
| Parameter | Type | Description |
|---|---|---|
| date | Date | The date/time to floor. |
| unit | String | The unit. Valid values are "minute", "hour", "day". |
| steps | Integer | Valid for "minute" or "hour" units. |
| reuse | Boolean | Whether use the specified instance or create a new one. Default is false. firstDayOfWeek: Integer? Optional day of week that overrides the one provided by the CLDR. locale: String? Optional locale used to determine first day of week. |
| dateClassObj |
Date
Floors the specified date to the start of day.
date: Date
The date to floor.
| Parameter | Type | Description |
|---|---|---|
| d | ||
| reuse | Boolean | Whether use the specified instance or create a new one. Default is false. |
| dateClassObj | Object | Optional. The Date class used, by default the native Date. |
Date
Floors the specified date to the start of the date's month.
date: Date
The date to floor.
| Parameter | Type | Description |
|---|---|---|
| d | ||
| reuse | Boolean | Whether use the specified instance or create a new one. Default is false. |
| dateClassObj | Object | Optional. The Date class used, by default the native Date. |
Floors the specified date to the beginning of week.
| Parameter | Type | Description |
|---|---|---|
| d | Date | Date to floor. |
| dateClassObj | ||
| dateFuncObj | Object | Optional. Object that contains the "add" method. By default dojo.date is used. |
| firstDayOfWeek | Integer | Optional. Optional day of week that overrides the one provided by the CLDR. |
| locale | String | Optional. Optional locale used to determine first day of week. |
Boolean
Tests if the specified date represents the starts of day.
| Parameter | Type | Description |
|---|---|---|
| d | Date | The date to test. |
| dateClassObj | Object | Optional. The Date class used, by default the native Date. |
| dateFuncObj | Object | Optional. Object that contains the "add" method. By default dojo.date is used. |
Boolean
Returns whether the specified date is in the current day.
| Parameter | Type | Description |
|---|---|---|
| d | Date | The date to test. |
| dateClassObj | Object | Optional. The Date class used, by default the native Date. |