Package: | Ext.ensible.cal |
Defined In: | Extensible.js |
Class: | Date |
Extends: | Object |
Contains utility date functions used by the calendar components.
Property | Defined By | |
---|---|---|
use24HourTime : Boolean Determines whether times used throughout all Extensible components should be displayed as
12 hour times with am/pm (d... Determines whether times used throughout all Extensible components should be displayed as
12 hour times with am/pm (default) or 24 hour / military format. Note that some locale files
may override this value by default. | Date |
Method | Defined By | |
---|---|---|
compare( Date dt1 , Date dt2 , [Boolean precise ] )
:
NumberCompares two dates and returns a value indicating how they relate to each other. Compares two dates and returns a value indicating how they relate to each other. Parameters:
| Date | |
copyTime( Date fromDt , Date toDt )
:
DateCopies the time value from one date object into another without altering the target's
date value. This function retu... Copies the time value from one date object into another without altering the target's
date value. This function returns a new Date instance without modifying either original value. Parameters:
| Date | |
diff( Date start , Date end , [String unit ] )
:
NumberReturns the time duration between two dates in the specified units. For finding the number
of calendar days (ignoring... Returns the time duration between two dates in the specified units. For finding the number
of calendar days (ignoring time) between two dates use diffDays instead. Parameters:
| Date | |
diffDays( Date start , Date end )
:
NumberCalculates the number of calendar days between two dates, ignoring time values.
A time span that starts at 11pm (23:... Calculates the number of calendar days between two dates, ignoring time values.
A time span that starts at 11pm (23:00) on Monday and ends at 1am (01:00) on Wednesday is
only 26 total hours, but it spans 3 calendar days, so this function would return 3. For the
exact time difference, use diff instead. Parameters:
| Date | |
isWeekday( Date dt )
:
BooleanReturns true if the specified date falls on a Monday through Fridey, else false. Returns true if the specified date falls on a Monday through Fridey, else false. Parameters:
| Date | |
isWeekend( Date dt )
:
BooleanReturns true if the specified date is a Saturday or Sunday, else false. Returns true if the specified date is a Saturday or Sunday, else false. Parameters:
| Date | |
max( Date dt1 , Date dt2 , [Date dtN ] )
:
DateReturns the maximum date value passed into the function. Any number of date
objects can be passed as separate params... Returns the maximum date value passed into the function. Any number of date
objects can be passed as separate params. Parameters:
| Date | |
min( Date dt1 , Date dt2 , [Date dtN ] )
:
DateReturns the minimum date value passed into the function. Any number of date
objects can be passed as separate params... Returns the minimum date value passed into the function. Any number of date
objects can be passed as separate params. Parameters:
| Date | |
rangesOverlap( Date start1 , Date end1 , Date start2 , Date end2 )
:
BooelanReturns true if two date ranges overlap (either one starts or ends within the other, or one completely
overlaps the s... Returns true if two date ranges overlap (either one starts or ends within the other, or one completely
overlaps the start and end of the other), else false if they do not. Parameters:
| Date |