Skip to content

Commit ad7ee98

Browse files
committed
fix: add missing documentation for DateFormatPart
1 parent 23000d0 commit ad7ee98

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

src/cldr.d.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,28 @@ export interface DateFieldNameOptions {
6262
/**
6363
* Returns a localized date field name based on a specific format specifier.
6464
*
65-
* @param options The dateFieldName options.
65+
* The available `type` values are:
66+
* - `era`
67+
* - `year`
68+
* - `quarter`
69+
* - `month`
70+
* - `week`
71+
* - `day`
72+
* - `dayperiod`
73+
* - `hour`
74+
* - `minute`
75+
* - `second`
76+
* - `zone`
77+
*
78+
* The available `nameType` values are:
79+
* - `wide`
80+
* - `narrow`
81+
* - `short`
82+
*
83+
* @param options Detailed configuration for the desired date field name.
6684
* @param locale The optional locale id. If not specified, the `"en"` locale id is used.
67-
* @returns The localized date field name determined by the dateFieldName options.
85+
* @returns The localized date field name from the current locale based on the option.
86+
*
6887
*
6988
* @example
7089
* ```

src/dates.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ export function formatDate(value: Date, format: string|DateFormatOptions, locale
100100
*/
101101
export function parseDate(value: string, format?: string | DateFormatOptions | string[] | DateFormatOptions[], locale?: string): Date;
102102

103+
/**
104+
* Details for the date format part.
105+
*/
103106
export interface DateFormatPart {
104107
/**
105108
* Specifies the type of the format part.

0 commit comments

Comments
 (0)