Throws an error if value is not defined. | |
Throws an error if value is not the right type. | |
Shortcut to using Function.checkType with a boolean for type. | |
Same as new Date() | |
Same as Date.now | |
Shortcut to using Function.checkType with a number for type. | |
Shortcut to using Function.checkType with a number for type. | |
An array with each of the day names in order starting at Sunday. | |
An array with each of the day abbreviations in order starting at Sunday. | |
An array with each of the months names in order starting at January. | |
An array with each of the months abbreviations in order starting at January. | |
An array with each of the month lengths in order starting with January. | |
An array with each of the month lengths added together from the first month to the current in the array. | |
Same as Date.defaultLengths but modifies for a leap you if _isLeapYear is true. | |
Same as Date.defaultAggregateLengths but modifies for a leap you if _isLeapYear is true. | |
Checks if passed in year is a leap year. | |
Returns the year length, 366 if a leap year, else 365 | |
Get the year”s week offset. | |
Convert a year date to a month date. | |
Created a copy of the current date. | |
Set the time to. | |
Same as to, but sets to the current time. | |
Same as to, but sets to the current time yesterday. | |
Same as to, but sets the the current time tomorrow. | |
Same as to, but sets the the current time this week. | |
Same as to, but sets the the current time last week. | |
Same as to, but sets the the current time next week. | |
Same as to, but sets the the current time this month. | |
Same as to, but sets the the current time last month. | |
Same as to, but sets the the current time next month. | |
Same as to, but sets the the current time this year. | |
Same as to, but sets the the current time last year. | |
Same as to, but sets the the current time next year. | |
Gets the name of the current day. | |
Gets the abbreviation of the current day. | |
Gets the name of the current month. | |
Gets the abbreviation of the current month. | |
Gets the date from the begining of the year. | |
Gets the day for the first day of the year. | |
Gets length of the current year. | |
Gets the date for yesterday. | |
Gets the date for tomorrow. | |
Gets the week of the year. | |
Gets a timestap for the begining of this week. | |
Gets the year date for the begining of this week. | |
Gets the date for last week. | |
Gets the date for next week. | |
Gets a timestamp for begining of this month. | |
Gets the year date at the begining of this month. | |
Gets the first week of this month. | |
Gets the day offset for the begining of this month. | |
Gets the length of this month. | |
Gets the length of the last month. | |
Gets the timestamp for last month. | |
Gets the timestamp for next month. | |
Gets the date for last year. | |
Gets the date for next year. | |
Sets the month and date to a year date. | |
Sets the month and date to this week. | |
Checks if this year is a leap year. | |
Check if a date object is before another date object | |
Check if a date object is after another date object | |
Check if an other date and time is the equal to this. | |
Check if an other date is the same as this. | |
Add an amount of time to a date. | |
Same as increment but decreases by the interval. | |
Clears hours, minutes, and seconds. |
| MooDate | Date extention needed for MooMonth. |
CC-GNU LGPL, http://creativecommons.org/licenses/LGPL/2.1/
copyright © 2007 Roland Poulter, dnalor@moomonth.com
Throws an error if value is not defined. | |
Throws an error if value is not the right type. | |
Shortcut to using Function.checkType with a boolean for type. |
Function.checkBoolean = function( bool )
Shortcut to using Function.checkType with a boolean for type. With a “boolean” kind.
| bool | Boolean to be checked. |
Same as new Date() | |
Same as Date.now | |
Shortcut to using Function.checkType with a number for type. | |
Shortcut to using Function.checkType with a number for type. | |
An array with each of the day names in order starting at Sunday. | |
An array with each of the day abbreviations in order starting at Sunday. | |
An array with each of the months names in order starting at January. | |
An array with each of the months abbreviations in order starting at January. | |
An array with each of the month lengths in order starting with January. | |
An array with each of the month lengths added together from the first month to the current in the array. | |
Same as Date.defaultLengths but modifies for a leap you if _isLeapYear is true. | |
Same as Date.defaultAggregateLengths but modifies for a leap you if _isLeapYear is true. | |
Checks if passed in year is a leap year. | |
Returns the year length, 366 if a leap year, else 365 | |
Get the year”s week offset. | |
Convert a year date to a month date. |
$today = function()
Same as Date.now
Date.checkYear = function( year )
Shortcut to using Function.checkType with a number for type. With a “year” kind.
| year | Value to be checked |
Date.checkDate = function( date )
Shortcut to using Function.checkType with a number for type. With a “date” kind.
| date | Value to be checked |
Date.getLengths = function( _isLeapYear )
Same as Date.defaultLengths but modifies for a leap you if _isLeapYear is true.
| boolean | Set to true if leap year. |
| array | Date.defaultAggregateLengths with modifications. |
Date.getAggregateLengths = function( _isLeapYear )
Same as Date.defaultAggregateLengths but modifies for a leap you if _isLeapYear is true.
| boolean | Set to true if leap year. |
| array | Date.defaultAggregateLengths with modifications. |
Created a copy of the current date. | |
Set the time to. | |
Same as to, but sets to the current time. | |
Same as to, but sets to the current time yesterday. | |
Same as to, but sets the the current time tomorrow. | |
Same as to, but sets the the current time this week. | |
Same as to, but sets the the current time last week. | |
Same as to, but sets the the current time next week. | |
Same as to, but sets the the current time this month. | |
Same as to, but sets the the current time last month. | |
Same as to, but sets the the current time next month. | |
Same as to, but sets the the current time this year. | |
Same as to, but sets the the current time last year. | |
Same as to, but sets the the current time next year. | |
Gets the name of the current day. | |
Gets the abbreviation of the current day. | |
Gets the name of the current month. | |
Gets the abbreviation of the current month. | |
Gets the date from the begining of the year. | |
Gets the day for the first day of the year. | |
Gets length of the current year. | |
Gets the date for yesterday. | |
Gets the date for tomorrow. | |
Gets the week of the year. | |
Gets a timestap for the begining of this week. | |
Gets the year date for the begining of this week. | |
Gets the date for last week. | |
Gets the date for next week. | |
Gets a timestamp for begining of this month. | |
Gets the year date at the begining of this month. | |
Gets the first week of this month. | |
Gets the day offset for the begining of this month. | |
Gets the length of this month. | |
Gets the length of the last month. | |
Gets the timestamp for last month. | |
Gets the timestamp for next month. | |
Gets the date for last year. | |
Gets the date for next year. | |
Sets the month and date to a year date. | |
Sets the month and date to this week. | |
Checks if this year is a leap year. | |
Check if a date object is before another date object | |
Check if a date object is after another date object | |
Check if an other date and time is the equal to this. | |
Check if an other date is the same as this. | |
Add an amount of time to a date. | |
Same as increment but decreases by the interval. | |
Clears hours, minutes, and seconds. |
Same as to, but sets to the current time.
Same as to, but sets to the current time yesterday.
Same as to, but sets the the current time tomorrow.
Same as to, but sets the the current time this week.
Same as to, but sets the the current time last week.
Same as to, but sets the the current time next week.
Same as to, but sets the the current time this month.
Same as to, but sets the the current time last month.
Same as to, but sets the the current time next month.
Same as to, but sets the the current time this year.
Same as to, but sets the the current time last year.
Same as to, but sets the the current time next year.
Same as increment but decreases by the interval.
Throws an error if value is not defined.
Function.checkValue = function( value, kind )
Throws an error if value is not the right type.
Function.checkType = function( value, type, kind )
Shortcut to using Function.checkType with a boolean for type.
Function.checkBoolean = function( bool )
Same as new Date()
Date.now = function()
Same as Date.now
$today = function()
Shortcut to using Function.checkType with a number for type.
Date.checkYear = function( year )
Shortcut to using Function.checkType with a number for type.
Date.checkDate = function( date )
Same as Date.defaultLengths but modifies for a leap you if _isLeapYear is true.
Date.getLengths = function( _isLeapYear )
Same as Date.defaultAggregateLengths but modifies for a leap you if _isLeapYear is true.
Date.getAggregateLengths = function( _isLeapYear )
Checks if passed in year is a leap year.
Date.isLeapYear = function( year )
Returns the year length, 366 if a leap year, else 365
Date.yearLength = function( _isLeapYear )
Get the year”s week offset.
Date.yearStartDay = function( year )
Convert a year date to a month date.
Date.yearDateToMonthDate = function( yearDate, _isLeapYear )