mtdowling / cron-expression

CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
http://mtdowling.com/blog/2012/06/03/cron-expressions-in-php/
MIT License
4.9k stars 335 forks source link

Add (unofficial) support for 'last workday of month' #127

Closed andersevenrud closed 7 years ago

andersevenrud commented 7 years ago

Added support for 'D' in month field that matches up against the last workday of a month.

Ex, for January 2016: The 29th. I know this is not in the crontab spec, but this came up during a project at work and I found it handy.

dragonmantank commented 7 years ago

Hello @andersevenrud!

Thank you for the PR. While this does seem interesting, I'm hesitant to add new characters that break the cron standard. This would also potentially be a problem as not everyone agrees on what the "last workday" is.