dojox/calendar/time (version 1.10)

See the dojox/calendar/time reference documentation for more information.

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.
  • floorToMonth(d,reuse,dateClassObj) Floors the specified date to the start of the date's month.
  • floorToWeek(d,dateClassObj,dateModule,firstDayOfWeek,locale) Floors the specified date to the beginning of week.
  • isOverlapping(renderData,start1,end1,start2,end2,includeLimits) Computes if the first time range defined by the start1 and end1 parameters is overlapping the second time range defined by the start2 and end2 parameters.
  • isStartOfDay(d,dateClassObj,dateModule) 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,unit,steps,reuse,dateClassObj)
Defined by dojox/calendar/time

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.

dateClassObj Object
Optional

The Date class used, by default the native Date.

Returns:Date | undefined
floorToDay(d,reuse,dateClassObj)
Defined by dojox/calendar/time

Floors the specified date to the start of day.

Parameter Type Description
d undefined
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.

Returns:Date | undefined
floorToMonth(d,reuse,dateClassObj)
Defined by dojox/calendar/time

Floors the specified date to the start of the date's month.

Parameter Type Description
d undefined
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.

Returns:Date | undefined
floorToWeek(d,dateClassObj,dateModule,firstDayOfWeek,locale)
Defined by dojox/calendar/time

Floors the specified date to the beginning of week.

Parameter Type Description
d Date

Date to floor.

dateClassObj Object
Optional

The Date class used, by default the native Date.

dateModule 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.

Returns:undefined
isOverlapping(renderData,start1,end1,start2,end2,includeLimits)
Defined by dojox/calendar/time

Computes if the first time range defined by the start1 and end1 parameters is overlapping the second time range defined by the start2 and end2 parameters.

Parameter Type Description
renderData Object

The current renderData

start1 Date

The start time of the first time range.

end1 Date

The end time of the first time range.

start2 Date

The start time of the second time range.

end2 Date

The end time of the second time range.

includeLimits Boolean

Whether include the end time or not.

Returns:Boolean | boolean
isStartOfDay(d,dateClassObj,dateModule)
Defined by dojox/calendar/time

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.

dateModule Object
Optional

Object that contains the "add" method. By default dojo.date is used.

Returns:Boolean | boolean
isToday(d,dateClassObj)
Defined by dojox/calendar/time

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.

Returns:Boolean | boolean
newDate(obj,dateClassObj)
Defined by dojox/calendar/time

Creates a new Date object.

Parameter Type Description
obj Object

This object can have several values: - the time in milliseconds since gregorian epoch. - a Date instance - a String instance that can be decoded by the dojo/date/stamp class.

dateClassObj Object
Optional

The Date class used, by default the native Date.

Returns:instance
Error in the documentation? Can’t find what you are looking for? Let us know!