Gollem::sortDate PHP Method

sortDate() public static method

Internal sorting function for 'date'.
public static sortDate ( $a, $b )
    public static function sortDate($a, $b)
    {
        $dirs = self::_sortDirs($a, $b);
        if ($dirs) {
            return $dirs;
        }
        if ($a['date'] > $b['date']) {
            return $GLOBALS['prefs']->getValue('sortdir') ? -1 : 1;
        } elseif ($a['date'] === $b['date']) {
            return self::sortName($a, $b);
        } else {
            return $GLOBALS['prefs']->getValue('sortdir') ? 1 : -1;
        }
    }