-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add support for chrono::DateTime<T> #114
Conversation
a961561
to
5a39369
Compare
5a39369
to
b9926cc
Compare
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 good, I'd be happy to merge this as it currently is.
I'd add an entry in the changelog, and a mention here in the readme:
Line 332 in 4109aec
| `std::time::SystemTime`, `magnus::Time` | `Time` | |
similar to how bytes
get a footnote calling out that it requires a feature:
Line 322 in 4109aec
| `String`, `PathBuf`, `char`, `magnus::RString`, `bytes::Bytes`\*\*\* | `String`, `#to_str` | |
Line 342 in 4109aec
\*\*\* when the `bytes` feature is enabled |
But I'm happy to make those changes myself after merging.
Given how the table is already a pretty cramped, it seemed like four Unfortunately, the footnotes appear at the bottom of the page instead of the table: |
You're right, I didn't know about markdown footnotes, that's neat. The readme is also rendered on crates.io, but I checked and that supports footnotes too. However I think the way it adds them to the bottom of the page is a dealbreaker for me, especially with such a long page. Maybe we could use *, †, ‡, §, ||, and ¶ instead of ever more asterisks? |
Updated. In typesetting, I think the symbols would be used in order of *, †, ‡, §, ||, and ¶ as footnote references are encountered in the table, and then the footnotes themselves would be sorted in that order, in contrast to what I just did. The symbols would also be superscripts, both in the references and in the footnotes. But I didn't want to get fancy. I'm sure you'll update it to something nice. |
This is great, thanks! |
Draft PR to add support for converting to and from
chrono::DateTime<Utc>
andchrono::DateTime<FixedOffset>
timestamps. Related discussion. I'm out of my depth here both with respect to the Ruby C API and with respect to usage ofchrono
, so additional diligence might be needed.I am not attached to this PR at all. With support for nanosecond precision recently added (still to be tested on our side), it is possible that we will not need
chrono
.