panlatent / cron-expression-descriptor

Converts cron expressions into human readable descriptions.
MIT License
16 stars 5 forks source link

Added correct processing of time intervals defined as set of values #1

Closed CaliforniaMountainSnake closed 4 years ago

CaliforniaMountainSnake commented 4 years ago

Added correct processing of time intervals defined as set of values. For example both expressions */15 * * * * and 0,15,30,45 * * * * are equal and means "Every 15 minutes". But the previous version of library didn't understand it and returned a long text with description of each time unit.

Added correct processing of "each time unit" defined as full set of values. For example, 0 * * * * and 0 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * * means "Every hour". But the previous version of library didn't understand it and returned a long text with description of each time unit.

Added the possibility to set the flag "use 24 hours format" in constructor of ExpressionDescriptor.

All new functionality is covered by tests. All old tests are executed without errors.

panlatent commented 4 years ago

Thank!

CaliforniaMountainSnake commented 4 years ago

@panlatent, thank you for merge)

CaliforniaMountainSnake commented 4 years ago

@panlatent, sorry man, but you did fail with git tags. 1.0.3 tag point to the previous version of the code, so, I can't install this via composer. Please, git checkout master in local, create a new 1.0.4 tag and git push --tags Screenshot_14

panlatent commented 4 years ago

@CaliforniaMountainSnake Okay. 1.0.4 is ready.

CaliforniaMountainSnake commented 4 years ago

Ok, thank you, all is well now.