public static function createFromDurationBeforeEnd($endDate, $interval) { $endDate = static::filterDatePoint($endDate); return new static($endDate->sub(static::filterDateInterval($interval)), $endDate); }