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

Bad example in README.md #13

Closed bggardner closed 12 years ago

bggardner commented 12 years ago

In the last example titled "Calculate a run date relative to a specific time", the argument passed to getNextRunDate should be a string (since it's later passed to the DateTime constructor). So, just remove the strtotime function.

BTW, thanks a ton for this. I've had a heck of a time writing my own parser.