Skip to content

Add option to output day and month literals instead of numbers #22

@nathcouret

Description

@nathcouret

The current implementation can parse both literals and numbers, but the generated AST only outputs can only outputs day and month expressions with numbers.

Option should defaults to false.

Sample code

Proper syntax to determine

const expression = "0 0 * * MON-FRI";

const numberResult = cronix(expression);
// outputs 1-5
console.log(numberResult.ast.dow.value());

const literalResult = cronix(expression, {outputLiterals: true});
// outputs MON-FRI
console.log(literalResult.ast.dow.value());

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions