Function parseCronDayOfWeek

  • Parses CronDayOfWeek into a string.

    Example

    parseCronDayOfWeek(6); // "6"
    parseCronDayOfWeek("*"); // "*"
    parseCronDayOfWeek("?"); // "?"
    parseCronDayOfWeek({ every: 6, start: 2 }); // "2/6"
    parseCronDayOfWeek({ every: 6, start: "L" }); // "L/6"
    parseCronDayOfWeek([1, 2, 3, 4]); // "1,2,3,4"
    parseCronDayOfWeek({ from: 1, to: 5 }); // "1-5"
    parseCronDayOfWeek({ from: "MON", to: "SAT" }); // "MON-SAT"
    parseCronDayOfWeek([1, 2, 3, { from: 5, to: 7 }]); // "1,2,3,5-7"
    parseCronDayOfWeek("L"); // "L"
    parseCronDayOfWeek({ last: 2 }); // "2L"
    parseCronDayOfWeek({ day: 1, week: 5 }); // "1#5"

    Returns

    A string or undefined if invalid.

    Parameters

    Returns Maybe<string>