Parses a string into a CronMonth.
CronMonth
parseStringMonth("10"); // 10parseStringMonth("*"); // "*"parseStringMonth("2/6"); // { every: 6, start: 2 }parseStringMonth("?/6"); // { every: 6, start: "?" }parseStringMonth("1,2,3,4"); // [1, 2, 3, 4]parseStringMonth("1-5"); // { from: 1, to: 5 }parseStringMonth("JAN-OCT"); // { from: "JAN", to: "OCT" }parseStringMonth("jan-oct"); // { from: "JAN", to: "OCT" }parseStringMonth("1,2,3,5-7"); // [1, 2, 3, { from: 5, to: 7 }]parseStringMonth("INVALID"); // undefinedparseStringMonth("1,2,3,4,INVALID"); // undefined
A CronMonth or undefined if invalid.
undefined
string to be parsed.
Parses a string into a
CronMonth
.Example
Returns
A
CronMonth
orundefined
if invalid.