public static function reorderExclusions($exclusions) {
    $new_exclusions = [];
    foreach ($exclusions as $exclusion) {
      $from = strtotime($exclusion['from']);
      $new_exclusions[$from] = $exclusion;
    }
    sort($new_exclusions);

    return $new_exclusions;
  }
public static function reorderExclusions($exclusions) {
    $new_exclusions = [];
    foreach ($exclusions as $exclusion) {
      $from = strtotime($exclusion['from']);
      $new_exclusions[$from] = $exclusion;
    }
    sort($new_exclusions);

    return $new_exclusions;
  }
public static function reorderExclusions ( $ exclusions ) { $ new_exclusions = [ ] ; foreach ( $ exclusions as $ exclusion ) { $ from = strtotime ( $ exclusion [ 'from' ] ) ; $ new_exclusions [ $ from ] = $ exclusion ; } sort ( $ new_exclusions ) ; return $ new_exclusions ; }
Return exclusions in order from earlier for later.

@param array $exclusions
Exclusions dates in session.

@return array
Return exclusions in order from earlier for later .