最近、Later.js ライブラリの使用を開始しましたが、複合スケジュールで「isValid」関数を使用する際にこの問題に直面しています。私はこれに慣れていないので、よくある間違いを犯している可能性があります。あわせてご案内ください。以下にコード スニペットとエラー メッセージを追加します。
var schedule =
later.parse.recur()
.on(25).dayOfMonth().on(5).month().on(2016).year()
.and()
.on(26).dayOfMonth().on(5).month().on(2016).year()
.and()
.on(27).dayOfMonth().on(5).month().on(2016).year()
var sched = later.schedule(schedule);
var ans = sched.isValid(new Date('2016-05-27'));
console.log(ans);
ここにエラーメッセージがあります
f:\Projects\DragonFly\node_modules\later\later.js:777
return !b || a.getTime() > b.getTime();
^
TypeError: a.getTime is not a function
at f:\Projects\DragonFly\node_modules\later\later.js:777:24
at findNext (f:\Projects\DragonFly\node_modules\later\later.js:785:23)
at getInstances (f:\Projects\DragonFly\node_modules\later\later.js:637:52)
at Object.later.schedule.sched.isValid (f:\Projects\DragonFly\node_modules\later\later.js:793:16)
at Object.<anonymous> (f:\Projects\DragonFly\Controllers\scheduleController.js:76:17)
Later.js を最新バージョンに更新しましたが、成功しませんでした。コードに誤りがあるのか、それともライブラリ自体のバグなのか教えてください。