javascript - Every 5 months recurrent rule with later.js -


i want create schedule every 5 month. try this:

var startdate = new date("2015-07-13t15:58:30.546z"); var s = later.parse.recur().every(5).month(); s.on(startdate.getdate()).dayofmonth(); var nextdates = later.schedule(s).next(3, startdate); console.log(nextdates); 

i'm expecting result:

[ fri jul 13 2015 02:00:00 gmt+0200 (ist),   wed dec 13 2016 02:00:00 gmt+0200 (ist),   mon may 13 2016 03:00:00 gmt+0300 (idt) ] 

but code above produce result:

[ sun nov 13 2015 02:00:00 gmt+0200 (ist),   fri jan 13 2016 02:00:00 gmt+0200 (ist),   wed jun 13 2016 03:00:00 gmt+0300 (idt) ] 

what missing?

may use startingon:

later.parse.recur()  .every(5).month()  .on(startdate.getdate()).dayofmonth()  .startingon(startdate.getmonth() + 1) 

added 1 since months indexed 0.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -