Changeset 253

Show
Ignore:
Timestamp:
07/22/08 19:02:58 (4 months ago)
Author:
xbrrr
Message:

Devrait régler une bonne fois pour toute le ticket #7

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/camptocamp.org/apps/frontend/lib/c2cTools.class.php

    r234 r253  
    367367    public static function stringDateToArray($date) 
    368368    { 
    369         if (!preg_match('/^(?<year>\d{4})-(?<month>\d{1,2})-(?<day>\d{1,2})$/', 
    370                         $date, $matches)) 
     369        if (!preg_match('/^(\d{4})-(\d{1,2})-(\d{1,2})$/', $date, $matches)) 
    371370            return $date; 
    372371 
    373         return $matches
     372        return array('year' => $matches[1], 'month' => $matches[2], 'day' => $matches[3])
    374373    } 
    375374}