Comments (5)
Did you try
Time.Date.delta (Time.Date.date 2018 4 1) (Time.Date.date 1932 4 2) |> .years
from elm-time.
yes. You, too?
It is very deceiving, but it does not work:
> import Time.Date
> Time.Date.delta (Time.Date.date 2018 4 3) (Time.Date.date 1932 4 2) |> .years
86 : Int
> Time.Date.delta (Time.Date.date 2018 4 1) (Time.Date.date 1932 4 2) |> .years
86 : Int
>
And the code is quite clear that it is incapable of doing what is required:
Line 390 in 5384e57
from elm-time.
Ahh, I see what you're pointing out now. Yeah, I'd consider this a bug. Thanks for noticing and submitting the issue. If you have a fix and would like to submit a PR, I'd be glad to process it. I have an idea for the fix and will try it if you don't.
I'm presently the maintainer of this package, and I can say that time processing has changed radically for Elm 0.19 (which was just released). I haven't gone over the details yet, but here's the new Time package. If you are planning on upgrading to Elm 0.19, you might want to check it out.
from elm-time.
Got bitten by this today. Actually, it isn't a bug, the current behavior is explicitly outlined in the docs along with a couple of examples. I somehow miss the functionality that date-fns was providing me in JS.
Would you accept PRs that add the missing functionality?
from elm-time.
Am archiving this repository which recommends closing this issue
from elm-time.
Related Issues (20)
- DateTime.toISO8601 truncates to seconds HOT 23
- DateTime.fromISO8601 fails to parse valid formats HOT 6
- travis build fails HOT 1
- Parsing fails when milliseconds are explicitly zero HOT 5
- Math naming of the fractional variables is wrong HOT 1
- Epoch and Millisencond HOT 1
- Timezone lost when reading from ISO 8601 HOT 2
- Confusing delta calculation HOT 1
- Beef up examples a bit HOT 1
- 1.0.11 & 1.0.12 versions produce compilation error HOT 14
- Upgrade to use version 2 of elm-community/parser-combinator HOT 1
- Problem with Etc/UTC±n timezone definitions? HOT 9
- Error parsing a valid ISO8601 date with a year less than 1000 HOT 2
- How to be with DateTimeData alias being internal? HOT 3
- [enhancement] Support unix epoch and epoch millisecond HOT 2
- Support end-of-day (hour 24) like ISO8601 HOT 1
- Range function to generate a list of dates between two dates HOT 2
- update for 0.19? HOT 5
- Support for time only ISO8601 HOT 1
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 elm-time.