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
Jan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec
-**|----|-----|----|-----|----|----|-----|-----|----|----|----
Both january and february are "touched", but their entire period is not within the date range. So is it 0 - month: since no complete month is within the range?
1 - month: since the date range crosses the boundary between january and february?
2 - months: since 2 different months are in the range??
And what if:
batchStartTime = new Date("1/20/2015")
batchEndTime = new Date("3/19/2015")
what would be the expected outcome?
Jan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec
---|_|_--|----|-----|----|----|-----|-----|----|----|----
1 - month: since one complete month is within the range?
2 - months: since the date range crosses the boundary between january, february and march?
3 - months: since 3 different months are in the range??
If I give the library two dates like so:
batchStartTime = new Date("1/2/2015")
batchEndTime = new Date("4/1/2015")
and then do
console.log date.difference(batchStartTime, batchEndTime, "month")
I would expect to see 2 as my result. I do not: I see 3.
The text was updated successfully, but these errors were encountered: