Changeset 4781 for trunk/include/functions_calendar.inc.php
- Timestamp:
- Jan 28, 2010, 12:30:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_calendar.inc.php
r4398 r4781 290 290 pwg_debug('end initialize_calendar'); 291 291 } 292 293 /* 294 * callback to sort array with date comparaison 295 * 296 **/ 297 function date_compare(&$a, &$b) 298 { 299 $parts = explode('-', $a); 300 foreach ($parts as &$p) { 301 $p = (int)$p; 302 } 303 $a = implode('-', $parts); 304 $parts = explode('-', $b); 305 foreach ($parts as &$p) { 306 $p = (int)$p; 307 } 308 $b = implode('-', $parts); 309 310 return strcmp($a, $b); 311 } 292 312 ?>
Note: See TracChangeset
for help on using the changeset viewer.