JavaScript

Date Class

Description

Methods to extend the native date variable.

Methods

adjust Method

Extension to the native date variable to allow for the quick adjustment of a given date.

constrain Method

Extension to the native date variable to allow the date variable to be constrained to a min and/or max.

diff Method

Extension to the native date variable to allow for checking the difference between the date variable and a specified date or the current date.

fromFormat Method

Extension to the native date variable to set the date variable to the value of the passed in date string.

getDayOfQuarter Method

Extension to the native date variable to the get the day of the quarter of a given date.

getDayOfYear Method

Extension to the native date variable to the get the day of the year of a given date.

getDaysInMonth Method

Extension to the native date variable to the get the number of days in the month a given date is in.

getDaysInQuarter Method

Extension to the native date variable to the get the number of days in the quarter a given date is in.

getQuarter Method

Extension to the native date variable to get the quarter a given date is in.

getQuarterRange Method

Extension to the native date variable to get the start and end of the quarter a given date is in.

getWeekOfYear Method

Extension to the native date variable to the get the week of the year a given date is in.

same Method

Extension to the native date variable to allow for checking if one date is the same as another in a given time scope.

setClock Method

Extension to the native date variable to allow for the quick setting of time on a date.

toCalendar Method

Extension to the native date variable to allow the conversion of the date into a calendar date relative to the current date.

toFormat Method

Extension to the native date variable to create a formatted string.

toRelative Method

Extension to the native date variable to allow the conversion of the date into string showing the date relative to the current date.