*Maintained fork of Later.* A javascript library for defining recurring schedules and calculating future (or past) occurrences for them. Includes support for using English phrases and Cron schedules. Works in Node and in the browser.
When later.parse.text has errors, passing its result to later.schedule gives valid schedule
Actual behavior
If I give an invalid text string to later.parse.text, say, at 20h, the result has errors but when passed to later.schedule, it generates something that is correct, but never runs. It breaks Bree, which runs (in src/job-utils.js):
const schedule = later.schedule(later.parse.text(value));
if (schedule.isValid()) return later.parse.text(value);
Expected behavior
I expect isValid to return false when the schedule is not valid.
Describe the bug
When
later.parse.text
has errors, passing its result tolater.schedule
gives valid scheduleActual behavior
If I give an invalid text string to later.parse.text, say,
at 20h
, the result has errors but when passed to later.schedule, it generates something that is correct, but never runs. It breaks Bree, which runs (insrc/job-utils.js
):Expected behavior
I expect
isValid
to return false when the schedule is not valid.Code to reproduce
Checklist