You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected all of the above calls to return "P30D" as "P30D" has a different meaning than the more ambiguous "P1M" (which has different meaning depending on a given date as an anchor point).
I know P1M can be contentious but shouldn't these be consistent across the board? The docs mention this:
For example, a year can be defined as 366 days, 365 days, 365.25 days, 12 months, or 52 weeks. Trying to convert years to days makes no sense without context. It is much better to use dayjs#diff for calculating days or years between two date times than to use Durations.
Which I agree with - but I also think converting days to years / months also makes no sense without context. What do you think?
Thanks in advance!
Information
Day.js Version [e.g. v1.0.0] 1.10.7
The text was updated successfully, but these errors were encountered:
Describe the bug
toISOString
Expected behavior
I expected all of the above calls to return "P30D" as "P30D" has a different meaning than the more ambiguous "P1M" (which has different meaning depending on a given date as an anchor point).
I know P1M can be contentious but shouldn't these be consistent across the board? The docs mention this:
Which I agree with - but I also think converting days to years / months also makes no sense without context. What do you think?
Thanks in advance!
Information
The text was updated successfully, but these errors were encountered: