-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement strftime #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @x-hgg-x! I'm excited to see where this goes.
Just to clarify, is your intent to match the behavior of all the time specifiers found in https://github.com/artichoke/strftime-ruby/blob/trunk/vendor/ruby-3.1.2/strftime.c?
Yes, I use the specification at https://ruby-doc.org/core-3.1.2/Time.html#method-i-strftime, with verification using the interpreter. |
Awesome thank you! |
Potential inconsistency with Ruby 3.1.2: Time.new(2021,10,21,1,1,1,'Z').wday # 7 (Sunday)
Time.at(Time.new(2021,10,21,1,1,1,'Z'), in: 'Z').wday # 4 (Thursday) |
It seems that many specifiers are invalid when the time zone is UTC: Time.new(2019,12,31,12,1,1,'Z').strftime("%G %g %V %U %W %u %w %j %a %A") # "2019 19 00 00 00 7 6 001 ? ?"
Time.new(2019,12,31,12,1,1,'A').strftime("%G %g %V %U %W %u %w %j %a %A") # "2020 20 01 52 52 2 2 365 Tue Tuesday" |
yea something weird is going on there:
|
Adding some more examples of this weirdness:
|
I'm taking a guess here but I bet Regardless, I think what |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is looking great so far!
The doc of
|
Bug and PR to fix this: |
Fix is merged in artichoke/artichoke@17e469b. |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for the PR @x-hgg-x.
Sorry for the boatload of comments, but this code is tricky and I want to make sure I grok the implementation.
I'd love to grant you commit rights to this repository if that's something you'd be open to. Let me know what you'd like me to do there.
I'll hold off on any more reviewing until you move the PR out of draft to "ready for review".
Thanks again!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tweaks to get the docs to build without std
feature.
I can prep the release after the tests pass and this gets merged. ooc, given that a trait is part of the public API, should we release as 1.0.0? |
I think the API is pretty complete at this point, so this should be ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple of questions. Apart from the suspicious calculation of size_limit
, this looks good to go.
Once all of the conversations are resolved, I'll merge this PR.
Huge thank you @x-hgg-x. This is some amazing work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Now that #15 is merged, the MSRV check should pass. Please rebase and then I'll merge.
🎉 @x-hgg-x thank you again so much. I'll make you a maintainer here later today when I'm done with work. There are a few changes I'd like to try and make, e.g. removing the bitflags dep. I'll tag you as a reviewer. Hopefully we can push out a 1.0 by the end of this week or next. |
Implement strftime.