- MockDate(clock): {
UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
now(): number;
parse(s: string): number;
new (...args: any[]): {
getVarDate: (() => VarDate);
[toPrimitive](hint: "default"): string;
[toPrimitive](hint: "string"): string;
[toPrimitive](hint: "number"): number;
[toPrimitive](hint: string): string | number;
getDate(): number;
getDay(): number;
getFullYear(): number;
getHours(): number;
getMilliseconds(): number;
getMinutes(): number;
getMonth(): number;
getSeconds(): number;
getTime(): number;
getTimezoneOffset(): number;
getUTCDate(): number;
getUTCDay(): number;
getUTCFullYear(): number;
getUTCHours(): number;
getUTCMilliseconds(): number;
getUTCMinutes(): number;
getUTCMonth(): number;
getUTCSeconds(): number;
setDate(date: number): number;
setFullYear(year: number, month?: number, date?: number): number;
setHours(hours: number, min?: number, sec?: number, ms?: number): number;
setMilliseconds(ms: number): number;
setMinutes(min: number, sec?: number, ms?: number): number;
setMonth(month: number, date?: number): number;
setSeconds(sec: number, ms?: number): number;
setTime(time: number): number;
setUTCDate(date: number): number;
setUTCFullYear(year: number, month?: number, date?: number): number;
setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
setUTCMilliseconds(ms: number): number;
setUTCMinutes(min: number, sec?: number, ms?: number): number;
setUTCMonth(month: number, date?: number): number;
setUTCSeconds(sec: number, ms?: number): number;
toDateString(): string;
toISOString(): string;
toJSON(key?: any): string;
toLocaleDateString(): string;
toLocaleDateString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleDateString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toLocaleString(): string;
toLocaleString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toLocaleTimeString(): string;
toLocaleTimeString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleTimeString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toString(): string;
toTimeString(): string;
toUTCString(): string;
valueOf(): number;
};
} Returns {
UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
now(): number;
parse(s: string): number;
new (...args: any[]): {
getVarDate: (() => VarDate);
[toPrimitive](hint: "default"): string;
[toPrimitive](hint: "string"): string;
[toPrimitive](hint: "number"): number;
[toPrimitive](hint: string): string | number;
getDate(): number;
getDay(): number;
getFullYear(): number;
getHours(): number;
getMilliseconds(): number;
getMinutes(): number;
getMonth(): number;
getSeconds(): number;
getTime(): number;
getTimezoneOffset(): number;
getUTCDate(): number;
getUTCDay(): number;
getUTCFullYear(): number;
getUTCHours(): number;
getUTCMilliseconds(): number;
getUTCMinutes(): number;
getUTCMonth(): number;
getUTCSeconds(): number;
setDate(date: number): number;
setFullYear(year: number, month?: number, date?: number): number;
setHours(hours: number, min?: number, sec?: number, ms?: number): number;
setMilliseconds(ms: number): number;
setMinutes(min: number, sec?: number, ms?: number): number;
setMonth(month: number, date?: number): number;
setSeconds(sec: number, ms?: number): number;
setTime(time: number): number;
setUTCDate(date: number): number;
setUTCFullYear(year: number, month?: number, date?: number): number;
setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
setUTCMilliseconds(ms: number): number;
setUTCMinutes(min: number, sec?: number, ms?: number): number;
setUTCMonth(month: number, date?: number): number;
setUTCSeconds(sec: number, ms?: number): number;
toDateString(): string;
toISOString(): string;
toJSON(key?: any): string;
toLocaleDateString(): string;
toLocaleDateString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleDateString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toLocaleString(): string;
toLocaleString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toLocaleTimeString(): string;
toLocaleTimeString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleTimeString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toString(): string;
toTimeString(): string;
toUTCString(): string;
valueOf(): number;
};
}
- new (...args): {
getVarDate: (() => VarDate);
[toPrimitive](hint: "default"): string;
[toPrimitive](hint: "string"): string;
[toPrimitive](hint: "number"): number;
[toPrimitive](hint: string): string | number;
getDate(): number;
getDay(): number;
getFullYear(): number;
getHours(): number;
getMilliseconds(): number;
getMinutes(): number;
getMonth(): number;
getSeconds(): number;
getTime(): number;
getTimezoneOffset(): number;
getUTCDate(): number;
getUTCDay(): number;
getUTCFullYear(): number;
getUTCHours(): number;
getUTCMilliseconds(): number;
getUTCMinutes(): number;
getUTCMonth(): number;
getUTCSeconds(): number;
setDate(date: number): number;
setFullYear(year: number, month?: number, date?: number): number;
setHours(hours: number, min?: number, sec?: number, ms?: number): number;
setMilliseconds(ms: number): number;
setMinutes(min: number, sec?: number, ms?: number): number;
setMonth(month: number, date?: number): number;
setSeconds(sec: number, ms?: number): number;
setTime(time: number): number;
setUTCDate(date: number): number;
setUTCFullYear(year: number, month?: number, date?: number): number;
setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
setUTCMilliseconds(ms: number): number;
setUTCMinutes(min: number, sec?: number, ms?: number): number;
setUTCMonth(month: number, date?: number): number;
setUTCSeconds(sec: number, ms?: number): number;
toDateString(): string;
toISOString(): string;
toJSON(key?: any): string;
toLocaleDateString(): string;
toLocaleDateString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleDateString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toLocaleString(): string;
toLocaleString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toLocaleTimeString(): string;
toLocaleTimeString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleTimeString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toString(): string;
toTimeString(): string;
toUTCString(): string;
valueOf(): number;
} Returns {
getVarDate: (() => VarDate);
[toPrimitive](hint: "default"): string;
[toPrimitive](hint: "string"): string;
[toPrimitive](hint: "number"): number;
[toPrimitive](hint: string): string | number;
getDate(): number;
getDay(): number;
getFullYear(): number;
getHours(): number;
getMilliseconds(): number;
getMinutes(): number;
getMonth(): number;
getSeconds(): number;
getTime(): number;
getTimezoneOffset(): number;
getUTCDate(): number;
getUTCDay(): number;
getUTCFullYear(): number;
getUTCHours(): number;
getUTCMilliseconds(): number;
getUTCMinutes(): number;
getUTCMonth(): number;
getUTCSeconds(): number;
setDate(date: number): number;
setFullYear(year: number, month?: number, date?: number): number;
setHours(hours: number, min?: number, sec?: number, ms?: number): number;
setMilliseconds(ms: number): number;
setMinutes(min: number, sec?: number, ms?: number): number;
setMonth(month: number, date?: number): number;
setSeconds(sec: number, ms?: number): number;
setTime(time: number): number;
setUTCDate(date: number): number;
setUTCFullYear(year: number, month?: number, date?: number): number;
setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
setUTCMilliseconds(ms: number): number;
setUTCMinutes(min: number, sec?: number, ms?: number): number;
setUTCMonth(month: number, date?: number): number;
setUTCSeconds(sec: number, ms?: number): number;
toDateString(): string;
toISOString(): string;
toJSON(key?: any): string;
toLocaleDateString(): string;
toLocaleDateString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleDateString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toLocaleString(): string;
toLocaleString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toLocaleTimeString(): string;
toLocaleTimeString(locales?: string | string[], options?: DateTimeFormatOptions): string;
toLocaleTimeString(locales?: LocalesArgument, options?: DateTimeFormatOptions): string;
toString(): string;
toTimeString(): string;
toUTCString(): string;
valueOf(): number;
}
getVarDate: (() => VarDate)
- (): VarDate
Returns VarDate
[toPrimitive]:function
- [toPrimitive](hint): string
Returns string
- [toPrimitive](hint): string
Returns string
- [toPrimitive](hint): number
Returns number
- [toPrimitive](hint): string | number
Returns string | number
getDate:function
- getDate(): number
Returns number
getDay:function
- getDay(): number
Returns number
getFullYear:function
- getFullYear(): number
Returns number
getHours:function
- getHours(): number
Returns number
getMilliseconds:function
- getMilliseconds(): number
Returns number
getMinutes:function
- getMinutes(): number
Returns number
getMonth:function
- getMonth(): number
Returns number
getSeconds:function
- getSeconds(): number
Returns number
getTime:function
- getTime(): number
Returns number
getTimezoneOffset:function
- getTimezoneOffset(): number
Returns number
getUTCDate:function
- getUTCDate(): number
Returns number
getUTCDay:function
- getUTCDay(): number
Returns number
getUTCFullYear:function
- getUTCFullYear(): number
Returns number
getUTCHours:function
- getUTCHours(): number
Returns number
getUTCMilliseconds:function
- getUTCMilliseconds(): number
Returns number
getUTCMinutes:function
- getUTCMinutes(): number
Returns number
getUTCMonth:function
- getUTCMonth(): number
Returns number
getUTCSeconds:function
- getUTCSeconds(): number
Returns number
setDate:function
- setDate(date): number
Returns number
setFullYear:function
- setFullYear(year, month?, date?): number
Parameters
- year: number
Optional
month: numberOptional
date: number
Returns number
setHours:function
- setHours(hours, min?, sec?, ms?): number
Parameters
- hours: number
Optional
min: numberOptional
sec: numberOptional
ms: number
Returns number
setMilliseconds:function
- setMilliseconds(ms): number
Returns number
setMinutes:function
- setMinutes(min, sec?, ms?): number
Parameters
- min: number
Optional
sec: numberOptional
ms: number
Returns number
setMonth:function
- setMonth(month, date?): number
Parameters
- month: number
Optional
date: number
Returns number
setSeconds:function
- setSeconds(sec, ms?): number
Parameters
- sec: number
Optional
ms: number
Returns number
setTime:function
- setTime(time): number
Returns number
setUTCDate:function
- setUTCDate(date): number
Returns number
setUTCFullYear:function
- setUTCFullYear(year, month?, date?): number
Parameters
- year: number
Optional
month: numberOptional
date: number
Returns number
setUTCHours:function
- setUTCHours(hours, min?, sec?, ms?): number
Parameters
- hours: number
Optional
min: numberOptional
sec: numberOptional
ms: number
Returns number
setUTCMilliseconds:function
- setUTCMilliseconds(ms): number
Returns number
setUTCMinutes:function
- setUTCMinutes(min, sec?, ms?): number
Parameters
- min: number
Optional
sec: numberOptional
ms: number
Returns number
setUTCMonth:function
- setUTCMonth(month, date?): number
Parameters
- month: number
Optional
date: number
Returns number
setUTCSeconds:function
- setUTCSeconds(sec, ms?): number
Parameters
- sec: number
Optional
ms: number
Returns number
toDateString:function
- toDateString(): string
Returns string
toISOString:function
- toISOString(): string
Returns string
toJSON:function
- toJSON(key?): string
Returns string
toLocaleDateString:function
- toLocaleDateString(): string
Returns string
- toLocaleDateString(locales?, options?): string
Parameters
Optional
locales: string | string[]Optional
options: DateTimeFormatOptions
Returns string
- toLocaleDateString(locales?, options?): string
Parameters
Optional
locales: LocalesArgumentOptional
options: DateTimeFormatOptions
Returns string
toLocaleString:function
- toLocaleString(): string
Returns string
- toLocaleString(locales?, options?): string
Parameters
Optional
locales: string | string[]Optional
options: DateTimeFormatOptions
Returns string
- toLocaleString(locales?, options?): string
Parameters
Optional
locales: LocalesArgumentOptional
options: DateTimeFormatOptions
Returns string
toLocaleTimeString:function
- toLocaleTimeString(): string
Returns string
- toLocaleTimeString(locales?, options?): string
Parameters
Optional
locales: string | string[]Optional
options: DateTimeFormatOptions
Returns string
- toLocaleTimeString(locales?, options?): string
Parameters
Optional
locales: LocalesArgumentOptional
options: DateTimeFormatOptions
Returns string
toString:function
- toString(): string
Returns string
toTimeString:function
- toTimeString(): string
Returns string
toUTCString:function
- toUTCString(): string
Returns string
valueOf:function
- valueOf(): number
Returns number
UTC:function
- UTC(year, monthIndex, date?, hours?, minutes?, seconds?, ms?): number
Parameters
- year: number
- monthIndex: number
Optional
date: numberOptional
hours: numberOptional
minutes: numberOptional
seconds: numberOptional
ms: number
Returns number
now:function
- now(): number
Returns number
parse:function
- parse(s): number
Returns number
Create a class like
Date
, but with itsnow
value tied to the value of a Clock instance.