Changeset 253
- Timestamp:
- 07/22/08 19:02:58 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/camptocamp.org/apps/frontend/lib/c2cTools.class.php
r234 r253 367 367 public static function stringDateToArray($date) 368 368 { 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)) 371 370 return $date; 372 371 373 return $matches;372 return array('year' => $matches[1], 'month' => $matches[2], 'day' => $matches[3]); 374 373 } 375 374 }
