import { Accessor } from 'solid-js'; import { MaybeAccessor } from '../utils/types.js'; import 'solid-js/types/reactive/signal'; type DateLike = Date | number | string | undefined; interface UseDateFormatOptions { /** * The locale(s) to used for dd/ddd/dddd/MMM/MMMM format * * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). */ locales?: Intl.LocalesArgument; /** * A custom function to re-modify the way to display meridiem * */ customMeridiem?: (hours: number, minutes: number, isLowercase?: boolean, hasPeriod?: boolean) => string; } declare const formatDate: (date: Date, formatStr: string, options?: UseDateFormatOptions) => string; declare const normalizeDate: (date: DateLike) => Date; /** * Get the formatted date according to the string of tokens passed in. * * @see https://solidjs-use.github.io/solidjs-use/shared/useDateFormat * @param date - The date to format, can either be a `Date` object, a timestamp, or a string * @param formatStr - The combination of tokens to format the date * @param options - UseDateFormatOptions */ declare function useDateFormat(date: MaybeAccessor, formatStr?: MaybeAccessor, options?: UseDateFormatOptions): Accessor; type UseDateFormatReturn = ReturnType; export { DateLike, UseDateFormatOptions, UseDateFormatReturn, formatDate, normalizeDate, useDateFormat };