DateJS Public Static Methods
Compares the first date to the second date and returns an number indication of their relative values. -1 = this is lessthan date. 0 = values are equal. 1 = this is greaterthan date.
number
Compares the first Date object to the second Date object and returns true if they are equal.
boolean
Gets the day-of-the-month, using local time.
number
Gets the day of the week, using local time.
number
Gets the day number (0-6) if given a culture-specific string which is a valid full or abbreviated day name.
number
Gets the number of days in the month, given a year and month value. Automatically corrects for leap year.
number
Gets the year, using local time.
number
Gets the hours in a date, using local time.
number
Gets the milliseconds of a Date, using local time.
number
Gets the minutes of a Date object, using local time.
number
Gets the month, using local time.
number
Gets the month number (0-11) if given a culture-specific string which is a valid full or abbreviated month name.
number
Gets the seconds of a Date object, using local time.
number
Gets the time value in milliseconds.
number
Returns a culture-specific timezone abbreviation based on a given offset and a boolean indicating whether daylight savings time is in effect.
string
Gets the timezone offset if given a culture-specific string which is a valid full or abbreviated timezone name and a boolean indicating whether daylight savings time is in effect.
number
Gets the day-of-the-month, using Universal Coordinated Time (UTC).
number
Gets the day of the week using Universal Coordinated Time (UTC).
number
Gets the year using Universal Coordinated Time (UTC).
number
Gets the hours value in a Date object using Universal Coordinated Time (UTC).
number
Gets the milliseconds of a Date object using Universal Coordinated Time (UTC).
number
Gets the minutes of a Date object using Universal Coordinated Time (UTC).
number
Gets the month of a Date object using Universal Coordinated Time (UTC).
number
Gets the seconds of a Date object using Universal Coordinated Time (UTC).
number
Returns true if the given year is a leap year, false otherwise.
boolean
Converts the specified string value into its JavaScript Date equivalent using culture-specific format information.
Converts the specified string value into its JavaScript Date equivalent using the specified format. The format of the string value must match one of the supplied formats exactly.
Converts the specified string value into its JavaScript Date equivalent using the specified formats (array). The format of the string value must match one of the supplied formats exactly.
Sets the numeric day-of-the-month value of the Date object using local time.
A numeric value equal to the day of the month.
number
Sets the year of the Date object using local time.
A numeric value for the year.
A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
A numeric value equal for the day of the month.
number
Sets the hour value in the Date object using local time.
A numeric value equal to the hours value.
A numeric value equal to the minutes value.
A numeric value equal to the seconds value.
A numeric value equal to the milliseconds value.
number
Sets the milliseconds value in the Date object using local time.
A numeric value equal to the millisecond value.
number
Sets the minutes value in the Date object using local time.
A numeric value equal to the minutes value.
A numeric value equal to the seconds value.
A numeric value equal to the milliseconds value.
number
Sets the month value in the Date object using local time.
A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
number
Sets the seconds value in the Date object using local time.
A numeric value equal to the seconds value.
A numeric value equal to the milliseconds value.
number
Sets the date and time value in the Date object.
A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
number
Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
A numeric value equal to the day of the month.
number
Sets the year value in the Date object using Universal Coordinated Time (UTC).
A numeric value equal to the year.
A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
A numeric value equal to the day of the month.
number
Sets the hours value in the Date object using Universal Coordinated Time (UTC).
A numeric value equal to the hours value.
A numeric value equal to the minutes value.
A numeric value equal to the seconds value.
A numeric value equal to the milliseconds value.
number
Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
A numeric value equal to the millisecond value.
number
Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
A numeric value equal to the minutes value.
A numeric value equal to the seconds value.
A numeric value equal to the milliseconds value.
number
Sets the month value in the Date object using Universal Coordinated Time (UTC).
A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
number
Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
A numeric value equal to the seconds value.
A numeric value equal to the milliseconds value.
number
Returns a date as a string value.
string
Returns a date as a string value in ISO format.
string
Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.
string
Returns a date as a string value appropriate to the host environment's current locale.
string
Returns a value as a string value appropriate to the host environment's current locale.
string
Returns a time as a string value appropriate to the host environment's current locale.
string
Returns a string representation of a date. The format of the string depends on the locale.
string
Returns a time as a string value.
string
Returns a date converted to a string using Universal Coordinated Time (UTC).
string
Gets a date that is set to the current date. The time is set to the start of the day (00:00 or 12:00 AM)
Validates the number is within an acceptable range for the days in a month [0-MaxDaysInMonth].
boolean
Validates the number is within an acceptable range for hours[0 - 23].Returns true if within range, otherwise false.
boolean
Validates the number is within an acceptable range for milliseconds[0 - 999].Returns true if within range, otherwise false.
boolean
Validates the number is within an acceptable range for minutes[0 - 59].Returns true if within range, otherwise false.
boolean
Validates the number is within an acceptable range for months[0 - 11].
boolean
Validates the number is within an acceptable range for seconds[0 - 59].Returns true if within range, otherwise false.
boolean
Validates the number is within an acceptable range for years[0 - 9999].
boolean
Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.
number