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.89k stars 339 forks source link

Month/Daynames should be case insensitive #21

Closed sebknzl closed 11 years ago

sebknzl commented 11 years ago

I find using "JAN" or "SUN" a little unusual, usual crons don't care about the case. I usually use "Jan" or "Sun".

Using str_ireplace() instead of strtr() should do the trick, e.g.

$value = str_ireplace( array( "JAN", "FEB", ... ), array( "0", "1", ... ), $value );
mtdowling commented 11 years ago

Can you send a pull request?

sebknzl commented 11 years ago

Ok, will do it in the next few days.