1

我正在尝试在 laterjs 中为每年指定时间的下 10 次事件创建一个时间表。

以下是我的代码:

var later = require("later")

var startdate = new Date();
var curr_time = "12:09:10";

later.date.localTime();   
var s = later.parse.recur().every(1).year().on(curr_time).time();
later.schedule(s).next(5, startdate);

回应是:

Array (5 items)
 0: Thu Aug 17 2017 12:09:10 GMT+0530 (India Standard Time)
 1: Fri Aug 18 2017 12:09:10 GMT+0530 (India Standard Time)
 2: Sat Aug 19 2017 12:09:10 GMT+0530 (India Standard Time)
 3: Sun Aug 20 2017 12:09:10 GMT+0530 (India Standard Time)
 4: Mon Aug 21 2017 12:09:10 GMT+0530 (India Standard Time)

请告诉我,我在哪里做错了。

4

0 回答 0