我想每 5 个月创建一次时间表。所以我试试这个:
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);
我期待得到这个结果:
[ 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) ]
但是上面的代码产生了这个结果:
[ 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) ]
我错过了什么?