Comments (6)
I'd be happy to review a PR -- I probably won't have time to work on this myself.
from chrono.
It's not urgent for me but I think I will find time for it
from chrono.
To be honest in my opinion the API and approach in the round
module is fundamentally flawed. A lot of the behavior doesn't make sense, especially for a library that tries to do handle dates and timezones correctly like chrono. And I don't think it is even possible to fix all logic bugs.
But we would need to have an alternative before it can be deprecated.
from chrono.
But we would need to have an alternative before it can be deprecated.
Why? If we think this API is silly or wrong or dangerous, we could deprecate it without providing an alternative.
Does the time crate provide this functionality?
from chrono.
There are some cases where it works and gives correct results. For example rounding or truncating a NaiveTime
to a reasonable Duration
such as 10 seconds. But rounding to for example 7 seconds, and especially when involving dates becomes a mess. And that is ignoring DST 😄.
Why? If we think this API is silly or wrong or dangerous, we could deprecate it without providing an alternative.
Maybe you are right. It does not really feel like an inconvenience yet, but we can expect more issues like this.
Does the time crate provide this functionality?
It doesn't seem to.
from chrono.
Another issue with duration_trunc
: #584.
from chrono.
Related Issues (20)
- Is there a way to instantiate DateTimes over a generic TimeZone type? HOT 3
- "input is not enough" for DateTime::parse_from_str but works for Utc.datetime_from_str HOT 2
- Deprecations causing large amount of churn, and result in less elegant code HOT 3
- Compile error using most recent version of chrono 0.4.36 HOT 2
- Version 0.4.36 has breaking changes with 0.4.35 HOT 2
- the trait bound `DateTime<Utc>: OptionFrom/ToWasmAbi` is not satisfied when targeting wasm32 HOT 3
- 0.5: Consider using smaller types for arguments
- Make Weekday::num_days_from public HOT 2
- Add a method to the `Offset` trait to return DST info HOT 5
- 0.5: Add a `LocalOffset` type HOT 4
- Verification of published packages HOT 2
- `gh-pages` branch HOT 3
- Releases has problematic naming of 0.4.8 release which puts it at the top HOT 3
- 0.4.37 semver-incompatibly removes trait bounds on `DateTime` HOT 10
- How do I get the raw underlying bytes of a `NaiveDate` HOT 4
- Parsing from string to DateTime - input is not enough for unique date and time HOT 3
- TimeDelta always returning a PT in seconds HOT 2
- NaiveDate::years_since wrong documentation
- Saturating operations HOT 3
- Datetime Parse Error when converting rfc2822 date to chrono Datetime HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrono.