Problem using period with a timezone #49
Hi, I'm the author of the article about time manipulation in elm and sorry for the delay of response, I had to rethink like my old self.
I make an Ellie App that still seems to reproduce what my problem was (but having changed DST, only one month is problematic at the moment).
The result of that code is this (it is for 2016):
Notice that March is displaying only 30 days.
To be fair, it could just be something wrong in my way of calculating the number of days. I was doing it that way to be consistent with my calculation of days without weekend, that I did thusly:
numberOfDaysBetweenNotCountingWeekend : Date -> Date -> Int numberOfDaysBetweenNotCountingWeekend start end = Period.diff start end |> (\d -> (d.week * 5) + d.day) |> abs |> (+) 1
I was using elm-date-extra 8.1.2 at the time, but I tested on Ellie with the 9.0.1 which I assume is the most recent one.
Thanks for asking me to do this, I should have done it form the start :)
The text was updated successfully, but these errors were encountered:
Thanks for the report, I believe the behavior you are seeing is part of the design of
I forked and modified your example to use Duration https://ellie-app.com/3KkfdF5yf9qa1/1 and it appears to be produce the right results.
I think the problem is that you are using