Function parseStringDayOfMonth

  • Parses a string into a CronDayOfMonth.

    Example

    parseStringDayOfMonth("10"); // 10,
    parseStringDayOfMonth("*"); // "*",
    parseStringDayOfMonth("?"); // "?",
    parseStringDayOfMonth("2/10"); // { every: 10, start: 2 },
    parseStringDayOfMonth("?/10"); // { every: 10, start: "?" },
    parseStringDayOfMonth("1,2,3,4"); // [1, 2, 3, 4],
    parseStringDayOfMonth("5-10"); // { from: 5, to: 10 },
    parseStringDayOfMonth("1,2,3,4,5-10"); // [1, 2, 3, 4, { from: 5, to: 10 }],
    parseStringDayOfMonth("L"); // "L",
    parseStringDayOfMonth("1W"); // { nearest: 1 },
    parseStringDayOfMonth("INVALID"); // undefined,
    parseStringDayOfMonth("1,2,3,4,INVALID"); // undefined,

    Returns

    A CronDayOfMonth or undefined if invalid.

    Parameters

    • source: string

      string to be parsed.

    Returns Maybe<CronDayOfMonth>