function _makemeeting_sort_choices in Make Meeting Scheduler 7.2
Helper function to sort choice dates
1 string reference to '_makemeeting_sort_choices'
- makemeeting_field_presave in ./
makemeeting.field.inc - Implements hook_field_presave().
File
- ./
makemeeting.field.inc, line 498 - This file is mostly about the field configuration.
Code
function _makemeeting_sort_choices($a, $b) {
if ($a['chdate']['year'] == $b['chdate']['year']) {
if ($a['chdate']['month'] == $b['chdate']['month']) {
if ($a['chdate']['day'] == $b['chdate']['day']) {
return 0;
}
else {
return (int) $a['chdate']['day'] < (int) $b['chdate']['day'] ? -1 : 1;
}
}
else {
return (int) $a['chdate']['month'] < (int) $b['chdate']['month'] ? -1 : 1;
}
}
else {
return (int) $a['chdate']['year'] < (int) $b['chdate']['year'] ? -1 : 1;
}
}