-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
temporal: use uppercase unit designator labels by default
This somewhat revives #22, but makes it possible to restore the previous behavior by enabling `jiff::fmt::temporal::SpanPrinter::lowercase`. The main motivation here is also detailed in #22, and it came up again in #188. I was previously reluctant to do this because I find `P1Y2M3DT4H5M6S` hideously difficult to read and `P1y2m3dT4h5m6s` somewhat less difficult to read. But now that `jiff::fmt::friendly` is a thing and users have easy access to a more readable duration display format, I feel less bad about this. It's still a shame that it's the default via `span.to_string()`, but I tried to sprinkle a few `format!("{span:#}")` in places to nudge users toward the friendly format. It's a shame more systems don't accept lowercase unit designator labels, but since Jiff uses the ISO 8601 by default specifically for its interoperability, it makes sense to be as interoperable as we can by default. Fixes #188
- Loading branch information
1 parent
21218a0
commit d100b15
Showing
17 changed files
with
337 additions
and
285 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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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.