I am trying to convert string month name to month number,
but why do I get ’03’ in the result for ‘Feb’ in,
strtolower(date('m', strtotime('Feb')));
I tested with other month names and they seem to be fine,
strtolower(date('m', strtotime('Jan'))); // 01
strtolower(date('m', strtotime('Mar'))); // 03
What have done wrong?
From the php.net manual:
This results in a mixture of todays date (January 30th) and “Feb” => February 30th – but this is not a valid date, so PHP returns the month number for March.
Trying something like
should solve the problem.