bradymholt / cRonstrue

JavaScript library that translates Cron expressions into human readable descriptions
http://bradymholt.github.io/cRonstrue/
MIT License
1.29k stars 168 forks source link

Expression '0 0 0 ? * 1#1 *' converting is wrong. Returns Wrong descrption for first day of the month. Shows wrong day. #213

Closed parasharabh closed 2 years ago

parasharabh commented 2 years ago

cron expression '0 0 0 ? 1#1 ' translates to 'At 12:00 AM, on the first Monday of the month' using cronstrue library, But correct description for '0 0 0 ? 1#1 ' is 'At 00:00:00am, on the 1st Sunday of the month, every month'

You can check it on 'https://bradymholt.github.io/cron-expression-descriptor/'. It shows correct results.

This one(https://bradymholt.github.io/cRonstrue/.) for cronsTrue shows incorrect results.

parasharabh commented 2 years ago

image

parasharabh commented 2 years ago

image

parasharabh commented 2 years ago

I tried by going through the code base and was about to raise a PR. I saw the options of dayOfWeekStartIndexZero. It resolved the issue.