/** * Format a Date as a string with a specific format and a specific style. To format as UTC Date, set the utc option to true. * * @example * Basic usage *```js * const date = new Date("2023-01-01T01:35:00.000Z") * const string = formatDate(date, "Month DD, YYYY, at HH:MM period", { utc: true, abbreviations: true }) * // returns "Jan. 1, 2023, at 1:35 p.m." * ``` * * Options can be passed as the last parameter. Pass {style: "rc"} to parse dates in French. * * @param date - The date to format. * @param format - The format string. * @param options - Additional options for formatting. * * @category Formatting */ export default function formatDate(date: Date, format: "YYYY-MM-DD" | "YYYY-MM-DD HH:MM:SS TZ" | "DayOfWeek, Month Day" | "Month DD" | "Month DD, HH:MM period" | "Month DD, HH:MM period TZ" | "DayOfWeek, HH:MM period" | "DayOfWeek, HH:MM period TZ" | "Month DD, YYYY" | "Month DD, YYYY, at HH:MM period" | "Month DD, YYYY, at HH:MM period TZ" | "DayOfWeek" | "Month" | "YYYY" | "MM" | "DD" | "HH:MM period" | "HH:MM period TZ", options?: { utc?: boolean; style?: "cbc" | "rc"; abbreviations?: boolean; noZeroPadding?: boolean; timeZone?: "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Canada/Saskatchewan" | "Canada/Yukon"; }): string;