HangfireIO / Cronos

A fully-featured .NET library for working with Cron expressions. Built with time zones in mind and intuitively handles daylight saving time transitions
MIT License
974 stars 114 forks source link

Problem with parsing days of month with comma #46

Closed PavelQuash closed 2 years ago

PavelQuash commented 2 years ago

Hello!

Today I found some error when try to parse 0 0 15,28 * * (in 15 and 28 day of each month at midnight) expression. In this case I used format without seconds, just five positions. But when I used CronExpression.Parse method, then I saw get exception with message Cronos.CronFormatException: Hours: Value must be a number between 0 and 23 (all inclusive).. I checked tests with commas and don't found this.

It is problem with autodetect format or not?

P.S. I fixed this problem when used format with seconds, just adding zero in seconds position 0 0 0 15,28 * *.

PavelQuash commented 2 years ago

I found mistake in my code. Everything is fine. Sorry)

odinserj commented 2 years ago

Looks like @aidmsu created too many tests to fail ☺️