import { ClockTime, ClockTimeWithSeconds, DateInputType, TDateISO, TDateISODate, TDateISOTime } from '../typescript'; type Format = 'long' | 'short' | 'narrow'; /** * Calculates the difference in days between two dates. * * @param date - The first date. * @param date2 - The second date. * @returns The number of days between the two dates. */ export declare function daysDiff(date: Date, date2: Date): number; /** * Returns the current date as an ISO formatted string. * * @returns The current date in ISO format. */ export declare function today(): TDateISODate; /** * Returns the current time as a clock time string. * * @param locale - The locale to use for formatting the day name. * @param withSeconds - Whether to include seconds in the clock time. * @returns The current time as a clock time string. */ export declare function timeStamp(locale?: Intl.LocalesArgument, withSeconds?: T): T extends true ? ClockTimeWithSeconds : ClockTime; /** * Converts a date to an ISO formatted date string. * * @param date - The date to convert. * @returns The date as an ISO formatted date string. */ export declare function toISODate(date: Date): TDateISODate; /** * Converts a date string from US format (MM/DD/YYYY) to ISO format (YYYY-MM-DD). * * @param date - The date string in US format (MM/DD/YYYY). * @returns The date string in ISO format (YYYY-MM-DD). */ export declare function parseUSDateToISODate(date: string): TDateISODate; /** * Converts a date to an ISO formatted string. * * @param date - The date to convert. * @returns The date as an ISO formatted string. */ export declare function toISOStringDate(date: Date): TDateISO; /** * Calculates the ISO week number for a given date. * * The ISO week date system is a leap week calendar system that is part of the ISO 8601 date and time standard. * It assigns a week number to each week of the year, where the first week of the year is the week that contains * the first Thursday of the year. * * @param date - The date object for which to calculate the week number. * @returns The ISO week number for the given date. */ export declare function getWeekNumber(date: Date): number; /** * Returns a string representing the week format of the given date. * The format is "YYYY-Www", where "YYYY" is the full year and "Www" is the week number. * * @param date - The date object to format. * @returns A string representing the week format of the given date. */ export declare function getWeekFormat(date: Date): `${number}-W${number}`; /** * Returns the month and year in ISO format (YYYY-MM) from a given Date object. * * @param date - The Date object to extract the month and year from. * @returns A string representing the month and year in ISO format (YYYY-MM). */ export declare function getMonthFormat(date: Date): `${number}-${number}`; /** * Converts a date to an ISO formatted time string. * * @param date - The date to convert. * @returns The date as an ISO formatted time string. */ export declare function toISOTime(date: Date): TDateISOTime; /** * Parses a date string into a specific HTML date format. * * @param value - The date string to be parsed. * @param format - The desired HTML date format. Defaults to 'date'. * Possible values are 'datetime-local', 'week', 'month', and 'date'. * @returns The date string formatted according to the specified HTML date format. * * The function first checks if the input value is already in the correct format. * If not, it attempts to parse the value into a Date object. If the value is not a valid date, * it logs an error and uses the current date instead. * * The function supports the following formats: * - 'datetime-local': Returns the date in ISO format. * - 'week': Returns the date in week format (e.g., "2021-W01"). * - 'month': Returns the date in month format (e.g., "2021-01"). * - 'date': Returns the date in ISO date format (e.g., "2021-01-01"). */ export declare function parseDateToHTMLFormat(value: string, format?: DateInputType): string; /** * Converts a date to a clock time string. * * @param date - The date to convert. * @param locale - The locale to use for formatting the day name. * @param withSeconds - Whether to include seconds in the clock time. * @returns The date as a clock time string. */ export declare function toClockTime(date: Date, locale?: Intl.LocalesArgument, withSeconds?: T): T extends true ? ClockTimeWithSeconds : ClockTime; /** * Gets the name of the day of the week for a given date. * * @param date - The date to get the day name for. * @param locale - The locale to use for formatting the day name. * @param format - The format of the day name (long, short, narrow). * @returns The name of the day of the week. */ export declare function getDayName(date: Date, locale?: Intl.LocalesArgument, format?: Format): string; /** * Gets the name of the month for a given date. * * @param date - The date to get the month name for. * @param locale - The locale to use for formatting the month name. * @param format - The format of the month name (long, short, narrow, numeric, 2-digit). * @returns The name of the month. */ export declare function getMonthName(date: Date, locale: Intl.LocalesArgument, format?: Format | 'numeric' | '2-digit'): string; export {};