Function parseStringMinutes

  • Parses a string into a CronMinutes.

    Example

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

    Returns

    A CronMinutes or undefined if invalid.

    Parameters

    • source: string

      string to be parsed.

    Returns Maybe<CronPart<CronMinutesValue>>