registration

This commit is contained in:
User
2025-02-02 16:08:03 +03:00
parent 7f6495eb4d
commit 78afbaed71
6334 changed files with 196774 additions and 165754 deletions

View File

@@ -1,8 +1,10 @@
import type { ISOFormatOptions } from "./types.js";
import type { ContextOptions, DateArg, ISOFormatOptions } from "./types.js";
/**
* The {@link formatISO} function options.
*/
export interface FormatISOOptions extends ISOFormatOptions {}
export interface FormatISOOptions
extends ISOFormatOptions,
ContextOptions<Date> {}
/**
* @name formatISO
* @category Common Helpers
@@ -11,12 +13,10 @@ export interface FormatISOOptions extends ISOFormatOptions {}
* @description
* Return the formatted date string in ISO 8601 format. Options may be passed to control the parts and notations of the date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The original date
* @param options - An object with options.
*
* @returns The formatted date string (in loca.l time zone)
* @returns The formatted date string (in local time zone)
*
* @throws `date` must not be Invalid Date
*
@@ -40,7 +40,7 @@ export interface FormatISOOptions extends ISOFormatOptions {}
* const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' })
* //=> '19:00:52Z'
*/
export declare function formatISO<DateType extends Date>(
date: DateType | number | string,
export declare function formatISO(
date: DateArg<Date> & {},
options?: FormatISOOptions,
): string;