icambron / twix.js

:hourglass::left_right_arrow: A date range plugin for moment.js
https://isaaccambron.com/twix.js/
MIT License
379 stars 54 forks source link

Iterating months is broken #56

Closed icambron closed 9 years ago

icambron commented 9 years ago
startDate = moment("2014-10-01")
endDate = moment("2014-12-01")
dateRange = moment.twix(startDate, endDate, true)

dateRange.count("months") //=> 3
it = dateRange.iterate("months")
it.next() //=> moment for 2014-10-01
it.next() //=> moment for 2014-11-01
it.next() //=> null

Should give us 12/1

icambron commented 9 years ago

Fixed in 3674ea7ef0c3 and released in 0.6.2. /cc @DouweM

DouweM commented 9 years ago

Awesome!