default
f
createDateFactory(customDayjs?: Dayjs): CreateDateFactoryReturn
Creates a date factory bound to a specific Dayjs instance.
f
timeout<T = void>(): Promise<T>
milliseconds: number,
value?: T
Creates a promise that resolves after a specified delay.
I
CreateDateOptions
Options controlling how a date is parsed and interpreted.
-
strict: boolean
Enables strict parsing mode. When true, input must exactly match the format.
-
throwOnInvalid: boolean
If true, throws an error when the parsed date is invalid.
-
timezone: string
Timezone identifier (e.g., "Asia/Kolkata"). Requires Dayjs timezone plugin.
-
utc: boolean
Forces UTC parsing. Takes priority over
timezone.
T
CreateDateFactoryReturn = { createDate: { (): ReturnType<Dayjs>; (): ReturnType<Dayjs>; }; dayjs: Dayjs; }
date: CreateDateInput,
format?: CreateDateFormat,
options?: CreateDateOptions
Return type of createDateFactory.
-
createDate: { (): ReturnType<Dayjs>; (): ReturnType<Dayjs>; }date: CreateDateInput,format?: CreateDateFormat,options?: CreateDateOptions
Unified date creation function.
-
dayjs: Dayjs
Underlying Dayjs instance used by this factory.
T
CreateDateFormat = string | undefined
Optional format string used when parsing a date.
T
CreateDateInput = ConfigType
Supported input types for creating a date.
v
createDate
Default preconfigured createDate function.