-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: week number formatting support in strftime
#147
Comments
The I don't think that will change personally. Particularly since I see More generally, full compatibility with other strtime APIs is pretty hard. There's no one featureful spec, and like regex engines, each implementation has their own little quirks and features with little hope for unification. I did of course try to be compatible where I could, but I think given how strtime works (a bunch of overly terse letter modifiers), there's just always going to be points where it doesn't fully line up with other implementations. As far as supporting ISO 8601 week dates in strtime, yes, absolutely, 100% I want to do that. I just didn't do it initially because I wasn't sure about the use case. Given that |
As always, thank you for your considerate and detailed response!
Interesting. This reminds me of old times with PHP, where Java does not use However, Since
That sounds fantastic!
Looking for gaps in
While May I be so bold and try to convince you that for
The next semver-breaking version might move A later (not necessarily semver-breaking) version may then add To my mind, the cost of such a breaking change is still small. At a later point, Of course, I am not in your shoes and this is merely my humble assessment of the situation and the options at hand. Footnotes
|
If I were convinced it was the right way to go, I wouldn't mind doing the breaking change. The fact that it's breaking isn't really what gives me pause. I just think it's better to have IANA time zone identifiers match an existing convention (from
I wouldn't, no. At least, not from any rigorous perspective. There are lots of incompatible strtime APIs out there. I'll think on this. |
Thank you very much for your consideration! |
While looking to replace
chrono
withjiff
in code where date formats are passed in from configuration, I realized I could not yet perform the full migration:jiff
does not yet provide formatting of zoned or civil date-time objects as week number in ISO 8601 week date (01–53, zero-padded).chrono
supports this as%V
, among other week number formats (%U
,%W
).chrono::format::strftime
matches GNU coreutilsDATE(1)
(e.g.date +%V
), which is very convenient when modernizing software.Is there any chance
jiff
would ever change its existing%V
(IANA time zone identifier) to a different specifier to allow forcoreutils
andchrono
compatible specifiers?Is the implementation of week number and week year formatting specifiers a feature that might be added to
jiff
?The text was updated successfully, but these errors were encountered: