Skip to content

Commit 84e3f70

Browse files
authored
avoid repetition of format options (#1796)
(as suggested by #1794 (comment); note that the second line is still in the ugly "paragraph" mode in VSCode, even though it's shorter that the first line 🤷
1 parent 090ad3a commit 84e3f70

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/format.d.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
* Returns a function that formats a given month number (from 0 = January to 11
33
* = December) according to the specified *locale* and *format*.
44
*
5-
* @param locale a [BCP 47 language tag][1]; defaults to U.S. English.
6-
* @param format a [month format][2]: either *2-digit*, *numeric*, *narrow*,
7-
* *short*, *long*; defaults to *short*.
8-
*
95
* [1]: https://tools.ietf.org/html/bcp47
106
* [2]: https://tc39.es/ecma402/#datetimeformat-objects
7+
*
8+
* @param locale - a [BCP 47 language tag][1]; defaults to U.S. English.
9+
* @param format - a [month format][2]; defaults to *short*.
1110
*/
1211
export function formatMonth(
1312
locale?: string,
@@ -18,12 +17,11 @@ export function formatMonth(
1817
* Returns a function that formats a given week day number (from 0 = Sunday to 6
1918
* = Saturday) according to the specified *locale* and *format*.
2019
*
21-
* @param locale a [BCP 47 language tag][1]; defaults to U.S. English.
22-
* @param format a [weekday format][2]: either *narrow*, *short*, or *long*;
23-
* defaults to *short*.
24-
*
2520
* [1]: https://tools.ietf.org/html/bcp47
2621
* [2]: https://tc39.es/ecma402/#datetimeformat-objects
22+
*
23+
* @param locale a [BCP 47 language tag][1]; defaults to U.S. English.
24+
* @param format a [weekday format][2]; defaults to *short*.
2725
*/
2826
export function formatWeekday(locale?: string, format?: "long" | "short" | "narrow"): (i: number) => string;
2927

0 commit comments

Comments
 (0)