Maybe what I want is 'too' custom and has to be done manually, I thought usort can do it but seems I don't understand it completely. Sorting an array of shows by date in descending order but if date is current year then put those in the beginning of the array:
usort($show, function($a, $b){
$year = (int) date("Y", time());
$a = $a['date'];
$b = $b['date'];
if ($a === $year) return -1;
if ($b === $year) return -1;
if ($a === $b) return 0;
return ($a > $b) ? -1 : 1;
});
usort(like any other user-defined comparison functions) does not declare strict order in which elements will be compared. Solution may be - two steps of sorting, first: sort elements by date (sort by"year"), second: put current year elements to the beginning (sort by"year == current year")