Search
DateTime Members
Constructors Properties Methods
 


A Javascript Date object wrapper that extends the functionality of the JavaScript Date object.

The following tables list the members exposed by the DateTime type.

 Public Constructors

  Name Description

DateTime

Initializes a new instance of the DateTime class.

 Public Properties

  Name Description

date

Gets the date component of this DateTime object.

day

Gets the day component of the date represented by this DateTime instance.

dayOfWeek

Gets the day of the week represented by this DateTime.

daysInMonth

Gets the number of days in the month represented by this DateTime.

hour

Gets the hour component of the date represented by this DateTime instance.

millisecond

Gets the millisecond component of the date represented by this DateTime instance.

minute

Gets the minute component of the date represented by this DateTime instance.

month

Gets the month component of the date represented by this DateTime instance.

second

Gets the second component of the date represented by this DateTime instance.

timeOfDay

Gets the time component of this DateTime object, expressed in milliseconds.

year

Gets the year component of the date represented by this DateTime instance.

 Public Methods

  Name Description

__getDate

Gets the day component of this DateTime instance.

__getDay

Gets the day of the week component of this DateTime instance.

__getFullYear

Gets the year component of this DateTime instance.

__getHours

Gets the hours component of this DateTime instance.

__getMilliseconds

Gets the milliseconds component of this DateTime instance.

__getMinutes

Gets the minutes component of this DateTime instance.

__getMonth

Gets the month component of this DateTime instance.

__getSeconds

Gets the seconds component of this DateTime instance.

__getTime

Gets the number of milliseconds between Jan 1 1970 00:00:00 and this DateTime instance.

__getTimezoneOffset

Gets the difference between GMT and local time in minutes.

__getUTCDate

Gets the day component of this DateTime instance, according to universal time.

__getUTCDay

Gets the day of the week component of this DateTime instance, according to universal time.

__getUTCFullYear

Gets the year component of this DateTime instance, according to universal time.

__getUTCHours

Gets the hours component of this DateTime instance, according to universal time.

__getUTCMilliseconds

Gets the milliseconds component of this DateTime instance, according to universal time.

__getUTCMinutes

Gets the minutes component of this DateTime instance, according to universal time.

__getUTCMonth

Gets the month component of this DateTime instance, according to universal time.

__getUTCSeconds

Gets the seconds component of this DateTime instance, according to universal time.

__setDate

Sets the day component of this DateTime instance.

__setFullYear

Sets the year component of this DateTime instance.

__setHours

Sets the hours component of this DateTime instance.

__setMilliseconds

Sets the milliseconds component of this DateTime instance.

__setMinutes

Sets the minutes component of this DateTime instance.

__setSeconds

Sets the seconds component of this DateTime instance.

__setTime

Sets a date and time by adding or subtracting a specified number of milliseconds to/from midnight 1 Jan 1970.

__setUTCDate

Sets the day component of this DateTime instance, according to universal time.

__setUTCFullYear

Sets the year component of this DateTime instance, according to universal time.

__setUTCHours

Sets the hours component of this DateTime instance, according to universal time.

__setUTCMilliseconds

Sets the milliseconds component of this DateTime instance, according to universal time.

__setUTCMinutes

Sets the minutes component of this DateTime instance, according to universal time.

__setUTCSeconds

Sets the seconds component of this DateTime instance, according to universal time.

__toDateString

Converts the date component of this DateTime instance to a readable string.

__toLocaleDateString

Converts the date component of this DateTime instance to a readable string, using locale conventions.

__toLocaleString

Converts this DateTime instance to a readable string, using locale conventions.

__toLocaleTimeString

Converts the time component of this DateTime instance to a readable string, using locale conventions.

__toString

Converts this DateTime instance to a readable string.

__toTimeString

Converts the time component of this DateTime instance to a readable string.

__toUTCString

Converts this DateTime instance to a readable string, according to universal time.

__valueOf

Represents the primitive value of this DateTime object.

addDays

Overloaded.  

addHours

Overloaded.  

addMilliseconds

Overloaded.  

addMinutes

Overloaded.  

addMonths

Overloaded.  

addSeconds

Overloaded.  

addYears

Overloaded.  

clone

Returns a copy of the current DateTime object.

combine

Combines the date component of a DateTime object and the time component of another DateTime object into a new DateTime object.

compareTo

Compares the current DateTime instance with another DateTime object and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

daysBetween

Returns the number of days between two DateTime instances.

equals

Returns a value indicating whether two DateTime objects are equal.

fromDateParts

Creates a new DateTime object, by specifying its different date and time components.

fromDateString

Creates a new DateTime object from a provided date string.

fromMilliseconds

Creates a new DateTime object from the number of milliseconds since Jan 1st 1970.

getDate

For internal use only.

getDayOfMonth

Returns the day of the month of the specified DateTime.

getDayOfWeek

Returns the day of the week of the specified DateTime.

getDaysInMonth

Overloaded.  

getMonth

Overloaded.  

getWeekFirstDate

Returns the beginning of the week of the specified DateTime.

getYear

Returns the year component of the specified DateTime.

greaterThan

Checks if this DateTime object is greater than the specified DateTime object.

greaterThanOrEqual

Checks if this DateTime object is greater than or equal to the specified DateTime object.

hoursBetween

Returns the number of hours between two DateTime instances.

isLeapYear

Returns a value indicating whether the year of the current DateTime instance is a leap year.

lessThan

Checks if this DateTime object is less than the specified DateTime object.

lessThanOrEqual

Checks if this DateTime object is less than or equal to the specified DateTime object.

maxDate

Returns the latter of two DateTime objects.

maxValue

Returns the highest possible DateTime value.

millisecondsBetween

Returns the number of milliseconds between two DateTime instances.

minDate

Returns the former of two DateTime objects.

minutesBetween

Returns the number of minutes between two DateTime instances.

minValue

Returns the lowest possible DateTime value.

monthsBetween

Returns the number of months between two DateTime instances.

now

Returns a DateTime object representing the current DateTime.

secondsBetween

Returns the number of seconds between two DateTime instances.

subtract

Overloaded.  

today

Returns a DateTime object representing the current Date.

toString

Returns a string representation of the current DateTime object.

valueOf

Represents the primitive value of this DateTime object.

weeksBetween

Returns the number of weeks between two DateTime instances.

yearsBetween

Returns the number of years between two DateTime instances.

 See Also