temporal-fmt 0.7.8 β†’ 0.7.9

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.
Files changed (2) hide show
  1. package/README.md +10 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # temporal-fmt
1
+ # temporal-fmt πŸ₯ΆπŸ”₯
2
2
 
3
3
  Format `Temporal.PlainDate` / `PlainTime` / `PlainDateTime` / `ZonedDateTime` objects
4
4
  using date-fns-style token strings.
@@ -202,12 +202,17 @@ sitting in your output waiting to confuse someone in three weeks.
202
202
  tokens (`yyyy`/`MM`/`dd`) never go through `Intl` and aren't affected.
203
203
  - Gluing two unpadded numeric tokens with no separator between them (e.g.
204
204
  `Md`, `dM`, `Hm`) is ambiguous for some inputs, and `parse()` throws rather
205
- than guessing. `"121"` against `Md` could mean month 1/day 21 or month
205
+ than guessing. `"121"` against `yyyy-Md` could mean month 1/day 21 or month
206
206
  12/day 1 β€” both are valid, so there's no single correct reading to fall
207
207
  back to. Unambiguous inputs against the same format string still parse
208
- normally (`"85"` against `Md` only has one valid split). If you need glued
209
- numeric fields, either zero-pad them (`MM`/`dd`) or put a separator between
210
- them; that removes the ambiguity entirely.
208
+ normally (`"85"` against `yyyy-Md` only has one valid split). If you need
209
+ glued numeric fields, either zero-pad them (`MM`/`dd`) or put a separator
210
+ between them; that removes the ambiguity entirely.
211
+
212
+ Note: `Md` (or `dM`/`Hm`) alone, with no `yyyy`, always throws β€”
213
+ `parse()` requires year, month, and day together to build a date, so a
214
+ bare `Md` format string is incomplete regardless of ambiguity. The
215
+ examples above use `yyyy-Md` for exactly this reason.
211
216
 
212
217
  ## Dev notes
213
218
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "temporal-fmt",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "description": "Format Temporal.PlainDate/PlainDateTime/PlainTime/ZonedDateTime objects using date-fns-style token strings.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",