dojox.calendar
Legend: Array Boolean Constructor Date DomNode Error Function Namespace Number Object RegExp Singleton String

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

floor
Date
floors the date to the unit.
ParameterTypeDescription
dateDateThe date/time to floor.
unitStringThe unit. Valid values are "minute", "hour", "day".
stepsIntegerValid for "minute" or "hour" units.
reuseBooleanWhether 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
floorToDay
Date
Floors the specified date to the start of day. date: Date The date to floor.
ParameterTypeDescription
d
reuseBooleanWhether use the specified instance or create a new one. Default is false.
dateClassObjObject
Optional.
The Date class used, by default the native Date.
floorToMonth
Date
Floors the specified date to the start of the date's month. date: Date The date to floor.
ParameterTypeDescription
d
reuseBooleanWhether use the specified instance or create a new one. Default is false.
dateClassObjObject
Optional.
The Date class used, by default the native Date.
floorToWeek
Floors the specified date to the beginning of week.
ParameterTypeDescription
dDateDate to floor.
dateClassObj
dateFuncObjObject
Optional.
Object that contains the "add" method. By default dojo.date is used.
firstDayOfWeekInteger
Optional.
Optional day of week that overrides the one provided by the CLDR.
localeString
Optional.
Optional locale used to determine first day of week.
isStartOfDay
Boolean
Tests if the specified date represents the starts of day.
ParameterTypeDescription
dDateThe date to test.
dateClassObjObject
Optional.
The Date class used, by default the native Date.
dateFuncObjObject
Optional.
Object that contains the "add" method. By default dojo.date is used.
isToday
Boolean
Returns whether the specified date is in the current day.
ParameterTypeDescription
dDateThe date to test.
dateClassObjObject
Optional.
The Date class used, by default the native Date.
newDate
Date
Creates a new Date object.
ParameterTypeDescription
objObjectThis object can have several values: the time in milliseconds since gregorian epoch. a Date instance
dateClassObjObject
Optional.
The Date class used, by default the native Date.