Ignore:
Timestamp:
Jul 10, 2014, 11:00:12 PM (10 years ago)
Author:
rvelices
Message:

bug 3056 quick search - fix regex for date searches (was not working with months 11 and 12)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_search.inc.php

    r28996 r29022  
    427427    foreach ($range as $i =>&$val)
    428428    {
    429       if (preg_match('/([0-9]{4})-?((?:0?[0-9])|(?:1[0-2]))?-?(((?:0?[0-9])|(?:[1-3][0-9])))?/', $val, $matches))
     429      if (preg_match('/([0-9]{4})-?((?:1[0-2])|(?:0?[1-9]))?-?((?:(?:[1-3][0-9])|(?:0?[1-9])))?/', $val, $matches))
    430430      {
    431431        array_shift($matches);
Note: See TracChangeset for help on using the changeset viewer.