addDays(value: Date, days: number): Date
Gets a new Date that adds the specified number of days to a given Date.
addHours(value: Date, hours: number): Date
Gets a new Date that adds the specified number of hours to a given Date.
addMinutes(value: Date, minutes: number): Date
Gets a new Date that adds the specified number of minutes to a given Date.
addMonths(value: Date, months: number): Date
Gets a new Date that adds the specified number of months to a given Date.
addSeconds(value: Date, seconds: number): Date
Gets a new Date that adds the specified number of seconds to a given Date.
addYears(value: Date, years: number): Date
Gets a new Date that adds the specified number of years to a given Date.
clone(date: Date): Date
Creates a copy of a given Date object.
Date object to copy.
equals(d1: Date | null, d2: Date | null): boolean
Returns true if two Date objects refer to the same date and time (or if both are null).
First date.
Second date.
fromDateTime(date: Date, time: Date): Date
Gets a Date object with the date and time set on two Date objects.
Date object that contains the date (day/month/year).
Date object that contains the time (hour:minute:second.millisecond).
fromFiscal(date: Date, govt: boolean): void
Converts a fiscal year date to a calendar date using the current culture.
monthFirst(value: Date): Date
Gets the first day of the month for a given Date.
Original date.
monthLast(value: Date): Date
Gets the last day of the month for a given Date.
Original date.
newDate(year?: number, month?: number, day?: number, hour?: number, min?: number, sec?: number, ms?: number): Date
Gets a new Date object instance.
Integer value representing the year, defaults to current year.
Integer value representing the month (0-11), defaults to current month.
Integer value representing the day (1-31), defaults to current day.
Integer value representing the hour, defaults to zero.
Integer value representing the minute, defaults to zero.
Integer value representing the second, defaults to zero.
Integer value representing the millisecond, defaults to zero.
sameDate(d1: Date, d2: Date): boolean
Returns true if two Date objects refer to the same date (ignoring time).
sameTime(d1: Date, d2: Date): boolean
Returns true if two Date objects refer to the same time (ignoring date).
toFiscal(date: Date, govt: boolean): void
Converts a calendar date to a fiscal date using the current culture.
weekFirst(value: Date, firstDayOfWeek?: Globalize): Date
Gets the first day of the week for a given Date.
Original date.
First day of week (0 for Sunday, 1 for Monday, etc). Defaults to first day of week for the current culture.
weekLast(value: Date, firstDayOfWeek?: Globalize): Date
Gets the last day of the week for a given Date.
Original date.
First day of week (0 for Sunday, 1 for Monday, etc). Defaults to first day of week for the current culture.
Provides date and time utilities.