function _release_info_compare_date

6.x updatexml.inc _release_info_compare_date($a, $b)
5.x updatexml.inc _release_info_compare_date($a, $b)

Helper function for release_info_filter_releases().

1 string reference to '_release_info_compare_date'
release_info_filter_releases in commands/pm/release_info/updatexml.inc
Filter a list of releases.

File

commands/pm/release_info/updatexml.inc, line 224
Drush release info engine for update.drupal.org and compatible services.

Code

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