app/Date/AbstractCalendarDate.php
public static function compare(AbstractCalendarDate $d1, AbstractCalendarDate $d2): int
    {
        if ($d1->maximum_julian_day < $d2->minimum_julian_day) {
            return -1;
        }

        if ($d2->maximum_julian_day < $d1->minimum_julian_day) {
            return 1;
        }

        return 0;
    }
public static function compare(AbstractCalendarDate $d1, AbstractCalendarDate $d2): int
    {
        if ($d1->maximum_julian_day < $d2->minimum_julian_day) {
            return -1;
        }

        if ($d2->maximum_julian_day < $d1->minimum_julian_day) {
            return 1;
        }

        return 0;
    }
public static function compare ( AbstractCalendarDate $ d1 , AbstractCalendarDate $ d2 ) : int { if ( $ d1 -> maximum_julian_day < $ d2 -> minimum_julian_day ) { return - 1 ; } if ( $ d2 -> maximum_julian_day < $ d1 -> minimum_julian_day ) { return 1 ; } return 0 ; }
Compare two dates, for sorting

@param AbstractCalendarDate $d1
@param AbstractCalendarDate $d2

@return int
Compare two dates for sorting