ComponentOne ASP.NET MVC Controls
DateTime Class
File
wijmo.js
Module
wijmo

Provides date and time utilities.

Methods

Methods

 

Static addDays
addDays(value: Date, days: number): Date

Gets a new Date that adds the specified number of days to a given Date.

Parameters
Returns
Date

 

Static addHours
addHours(value: Date, hours: number): Date

Gets a new Date that adds the specified number of hours to a given Date.

Parameters
Returns
Date

 

Static addMinutes
addMinutes(value: Date, minutes: number): Date

Gets a new Date that adds the specified number of minutes to a given Date.

Parameters
Returns
Date

Static addMonths

addMonths(value: Date, months: number): Date

Gets a new Date that adds the specified number of months to a given Date.

Parameters
Returns
Date

Static addSeconds

addSeconds(value: Date, seconds: number): Date

Gets a new Date that adds the specified number of seconds to a given Date.

Parameters
Returns
Date

Static addYears

addYears(value: Date, years: number): Date

Gets a new Date that adds the specified number of years to a given Date.

Parameters
Returns
Date

Static clone

clone(date: Date): Date

Creates a copy of a given Date object.

Parameters
Returns
Date

Static equals

equals(d1: Date, d2: Date): boolean

Returns true if two Date objects refer to the same date and time.

Parameters
Returns
boolean

Static fromDateTime

fromDateTime(date: Date, time: Date): Date

Gets a Date object with the date and time set on two Date objects.

Parameters
Returns
Date

Static fromFiscal

fromFiscal(date: Date, govt: boolean): void

Converts a fiscal year date to a calendar date using the current culture.

Parameters
Returns
void

Static newDate

newDate(year?: number, month?: number, day?: number, hour?: number, min?: number, sec?: number, ms?: number): Date

Gets a new Date object instance.

Parameters
Returns
Date

Static sameDate

sameDate(d1: Date, d2: Date): boolean

Returns true if two Date objects refer to the same date (ignoring time).

Parameters
Returns
boolean

Static sameTime

sameTime(d1: Date, d2: Date): boolean

Returns true if two Date objects refer to the same time (ignoring date).

Parameters
Returns
boolean

Static toFiscal

toFiscal(date: Date, govt: boolean): void

Converts a calendar date to a fiscal date using the current culture.

Parameters
Returns
void