Interface DateTimeFormat
interface DateTimeFormat {
format(date?: number | Date): string;
formatRange(
startDate: number | bigint | Date,
endDate: number | bigint | Date,
): string;
formatRangeToParts(
startDate: number | bigint | Date,
endDate: number | bigint | Date,
): DateTimeRangeFormatPart[];
formatToParts(date?: number | Date): DateTimeFormatPart[];
resolvedOptions(): ResolvedDateTimeFormatOptions;
}
format(date?: number | Date): string;
formatRange(
startDate: number | bigint | Date,
endDate: number | bigint | Date,
): string;
formatRangeToParts(
startDate: number | bigint | Date,
endDate: number | bigint | Date,
): DateTimeRangeFormatPart[];
formatToParts(date?: number | Date): DateTimeFormatPart[];
resolvedOptions(): ResolvedDateTimeFormatOptions;
}
Index
Methods
format
formatRange
formatRangeToParts
- formatRangeToParts(
startDate: number | bigint | Date,
endDate: number | bigint | Date,
): DateTimeRangeFormatPart[] Returns DateTimeRangeFormatPart[]
formatToParts
- formatToParts(date?: number | Date): DateTimeFormatPart[]
Parameters
Optional
date: number | Date
Returns DateTimeFormatPart[]
resolvedOptions
- resolvedOptions(): ResolvedDateTimeFormatOptions
Returns ResolvedDateTimeFormatOptions