-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fmt/strtime: add %V and %:V for formatting and parsing IANA time zone…
… identifiers This matches the V specifier used by [Java's formatting/parsing infrastructure][java format]. The motivation for this is to bring the strtime APIs to parity with `jiff::fmt::temporal`. Namely, without an IANA time zone identifier, one cannot correctly roundtrip a `Zoned` value. Jiff does support `%Z` when formatting for printing time zone abbreviations like `EDT` or `EST`, but since these are ambiguous, they aren't supported while parsing. (Perhaps we should support parsing and validating them though, especially in conjunction with a IANA time zone identifier.) When using `%V`, if there is no IANA time zone identifier, then the offset without colons is used instead. To get an offset with colons, use `%:V`. [java format]: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/format/DateTimeFormatter.html#ISO_ZONED_DATE_TIME
- Loading branch information
1 parent
4286f1b
commit 482e2b4
Showing
6 changed files
with
424 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.