function _drush_pm_compare_date

4.x pm.drush.inc _drush_pm_compare_date($a, $b)

Helper function for _drush_pm_filter_releases().

1 string reference to '_drush_pm_compare_date'
_drush_pm_filter_releases in commands/pm/pm.drush.inc
Filter a list of releases.

File

commands/pm/pm.drush.inc, line 1292
The drush Project Manager

Code

function _drush_pm_compare_date($a, $b) {
  if ($a['date'] == $b['date']) {
    return 0;
  }
  if ($a['version_major'] == $b['version_major']) {
    return ($a['date'] > $b['date']) ? -1 : 1;
  }
  return ($a['version_major'] > $b['version_major']) ? -1 : 1;
}