time-rs / time

The most used Rust library for date and time handling.
https://time-rs.github.io
Apache License 2.0
1.09k stars 273 forks source link

Time 0.1 request: make fields of duration public #579

Closed pitdicker closed 1 year ago

pitdicker commented 1 year ago

For Chrono I am preparing a branch that makes more methods const. Because the Duration type of time 0.1 is part of its public API it still has a dependency on that old version (although it can be disabled).

I am not asking for major changes. But would you consider making a new point release that makes the fields of Duration public? That would make it possible to convert from time::Duration to our own implementation, even in const methods.

pitdicker commented 1 year ago

Sorry, this request didn't make sense. Ignore me 😄

jhpratt commented 1 year ago

From a technical perspective it could be done and would solve your issue, but I wouldn't make the change regardless because there are invariants that need to be upheld.