We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9066dd0 commit 07e6263Copy full SHA for 07e6263
packages/format-number/src/format-annee.ts
@@ -0,0 +1,11 @@
1
+export const FORMAT_ANNEE_OPTIONS = {
2
+ style: "unit",
3
+ unit: "year",
4
+} satisfies Intl.NumberFormatOptions;
5
+
6
+export function formatAnnee(value: number, options?: Intl.NumberFormatOptions) {
7
+ return value.toLocaleString("fr-FR", {
8
+ ...FORMAT_ANNEE_OPTIONS,
9
+ ...options,
10
+ });
11
+}
0 commit comments