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
{{ message }}
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.
@dmfilipenko I agree on that. Another example, Feb 15 to Mar 17:
JSON.stringify( datediff( new Date(2016,01,15,12,0,0), new Date(2016,02,17,12,0,0)))
I'd expect that to be 1 month, 2 days. But as current solution transposes the interval back to Jan 1, the result is 1 month 0 days (because there's 31 day in January).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Take two dates:
28 Feb 2015
and28 Mar 2015
.Correct diff should be 1 month. Current
datediff()
implementation returns 0 months, 28 days:Although I find this solution quite elegant, it is not really accurate.
upd. I wrote another implementation of date difference that solves the issue.
The text was updated successfully, but these errors were encountered: