public static function of(LocalDate $startDate, LocalDate $endDate) : LocalDateRange
    {
        if ($endDate->isBefore($startDate)) {
            throw new DateTimeException('The end date must not be before the start date.');
        }

        return new LocalDateRange($startDate, $endDate);
    }