DataType.Date provides a set of utility functions to operate against Date objects.
addDays
oDate
numMonths
Adds a specified number of days to the given date.
addMonths
oDate
numMonths
Adds a specified number of months to the given date.
addYears
oDate
numYears
Adds a specified number of years to the given date.
areEqual
aDate
bDate
Checks whether two dates correspond to the same date and time.
daysInMonth
oDate
Takes a native JavaScript Date and returns the number of days in the month that the given date belongs to.
oDate
Date
Date in the month for which the number of days is desired.
format
oDate
oConfig
Takes a native JavaScript Date and formats it as a string for display to user.
oDate
Date
Date.
oConfig
Object
(Optional) Object literal of configuration values:
Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html PHP added a few of its own, defined at http://www.php.net/strftime
This javascript implementation supports all the PHP specifiers and a few more. The full list is below.
If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d. This may be overridden by the deprecated Y.config.dateFormat property.
isGreater
aDate
bDate
Checks whether the first date comes later than the second.
isGreaterOrEqual
aDate
bDate
Checks whether the first date comes later than or is the same as the second.
isInRange
aDate
bDate
cDate
Checks whether the date is between two other given dates.
isValidDate
oDate
Checks whether a native JavaScript Date contains a valid value.
oDate
Date
Date in the month for which the number of days is desired.
listOfDatesInMonth
oDate
Lists all dates in a given month.
oDate
Date
The date corresponding to the month for which a list of dates is required.