Date provides a set of utility functions to operate against Date objects.
addDaysoDate
numDays
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:82
Adds a specified number of days to the given date.
A new Date with the specified number of days added to the original date.
addMonthsoDate
numMonths
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:96
Adds a specified number of months to the given date.
A new Date with the specified number of months added to the original date.
addYearsoDate
numYears
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:119
Adds a specified number of years to the given date.
A new Date with the specified number of years added to the original date.
areEqualaDate
bDate
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:29
Checks whether two dates correspond to the same date and time.
True if the two dates correspond to the same date and time.
daysInMonthoDate
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:161
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.
A number (either 28, 29, 30 or 31) of days in the given month.
formatoDate
oConfig
Defined in
date/js/date-format.js:169
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.
Formatted date for display.
isGreateraDate
bDate
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:42
Checks whether the first date comes later than the second.
True if the first date is later than the second.
isGreaterOrEqualaDate
bDate
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:54
Checks whether the first date comes later than or is the same as the second.
True if the first date is later than or the same as the second.
isInRangeaDate
bDate
cDate
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:69
Checks whether the date is between two other given dates.
True if the date is between the two other given dates.
isValidDateoDate
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:12
Checks whether a native JavaScript Date contains a valid value.
oDate
Date
Date in the month for which the number of days is desired.
True if the date argument contains a valid value.
listOfDatesInMonthoDate
Provided by the datatype-date-math module.
Defined in
date/js/date-math.js:136
Lists all dates in a given month.
oDate
Date
The date corresponding to the month for which a list of dates is required.
An Array of Dates from a given month.
parsedata
Provided by the datatype-date-parse module.
Defined in
date/js/date-parse.js:9
Converts data to type Date.
a Date object or null if unable to parse
xPadx
pad
r
Defined in
date/js/date-format.js:41
Pad a number with leading spaces, zeroes or something else