temporal-fmt 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,12 +60,12 @@ format(hebrewDate, 'MMMM d, yyyy'); // "Av 21, 5786"
|
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
**Numeric fields (`yyyy`, `MM`, `dd`, `HH`, `mm`, `ss`, `SSS`) always come out
|
|
63
|
-
in Western (0-9) digits, no matter what locale you pass.**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
in Western (0-9) digits, no matter what locale you pass.** On purpose. Most
|
|
64
|
+
things reading this output back in — logs, APIs, filenames — want boring,
|
|
65
|
+
predictable ASCII digits, and locale-native numeral systems like Arabic-Indic
|
|
66
|
+
or Devanagari don't play nicely with this library's zero-padding logic anyway.
|
|
67
|
+
Need localized digits? Run the numeric pieces through `Intl.NumberFormat`
|
|
68
|
+
yourself.
|
|
69
69
|
|
|
70
70
|
**One more catch: this needs native `Intl`/`Temporal` interop to work.** On
|
|
71
71
|
Node 26+ with native `Temporal`, you're fine. On older Node with a userland
|
|
@@ -114,16 +114,15 @@ sitting in your output waiting to confuse someone in three weeks.
|
|
|
114
114
|
## Dev notes
|
|
115
115
|
|
|
116
116
|
`tsconfig.json` sets `ignoreDeprecations: "6.0"` to work around a tsup bug
|
|
117
|
-
(tsup#1388/#1389)
|
|
118
|
-
`baseUrl`, and TypeScript 6+ hard-errors on it.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
Tests pull from `temporal-polyfill/full`, not the slim `temporal-polyfill
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
themselves. Everything passes clean on Node 26+.
|
|
117
|
+
(tsup#1388/#1389). tsup's dts build step quietly injects a deprecated
|
|
118
|
+
`baseUrl`, and TypeScript 6+ hard-errors on it. Workaround, not a fix — drop
|
|
119
|
+
it the moment tsup ships a real one upstream.
|
|
120
|
+
|
|
121
|
+
Tests pull from `temporal-polyfill/full`, not the slim `temporal-polyfill` —
|
|
122
|
+
the Hebrew-calendar test needs the full build's calendar data, and the slim
|
|
123
|
+
one won't cut it. On Node < 26 without native `Temporal`, expect the
|
|
124
|
+
locale-aware tests to fail with `Cannot use valueOf`. Same polyfill/`Intl`
|
|
125
|
+
interop gap mentioned above, not a bug in the tests. Clean pass on Node 26+.
|
|
127
126
|
|
|
128
127
|
## License
|
|
129
128
|
|
package/package.json
CHANGED