}
| tMONTH tUNUMBER {
((struct date_yy *)parm)->yyMonth = $1;
- ((struct date_yy *)parm)->yyDay = $2;
+ if ($2 > 1000) {
+ ((struct date_yy *)parm)->yyYear = $2;
+ } else {
+ ((struct date_yy *)parm)->yyDay = $2;
+ }
}
| tMONTH tUNUMBER ',' tUNUMBER {
((struct date_yy *)parm)->yyMonth = $1;
}
| tUNUMBER tMONTH {
((struct date_yy *)parm)->yyMonth = $2;
- ((struct date_yy *)parm)->yyDay = $1;
+ if ($1 > 1000) {
+ ((struct date_yy *)parm)->yyYear = $1;
+ } else {
+ ((struct date_yy *)parm)->yyDay = $1;
+ }
}
| tUNUMBER tMONTH tUNUMBER {
((struct date_yy *)parm)->yyMonth = $2;
--- /dev/null
+--TEST--
+Bug #26198 (strtotime handling of "M Y" and "Y M" format)
+--FILE--
+<?php
+ echo date("F Y\n", strtotime("Oct 2001"));
+ echo date("M Y\n", strtotime("2001 Oct"));
+?>
+--EXPECT--
+October 2001
+Oct 2001