mirror of
https://github.com/itflow-org/itflow
synced 2026-06-18 15:51:05 +00:00
Allow PHP-8.2 and up Compatibility instead of just PHP-8.4
This commit is contained in:
38
plugins/vendor/illuminate/support/Carbon.php
vendored
38
plugins/vendor/illuminate/support/Carbon.php
vendored
@@ -33,4 +33,42 @@ class Carbon extends BaseCarbon
|
||||
|
||||
return static::createFromInterface($id->getDateTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current date / time plus a given amount of time.
|
||||
*/
|
||||
public function plus(
|
||||
int $years = 0,
|
||||
int $months = 0,
|
||||
int $weeks = 0,
|
||||
int $days = 0,
|
||||
int $hours = 0,
|
||||
int $minutes = 0,
|
||||
int $seconds = 0,
|
||||
int $microseconds = 0
|
||||
): static {
|
||||
return $this->add("
|
||||
$years years $months months $weeks weeks $days days
|
||||
$hours hours $minutes minutes $seconds seconds $microseconds microseconds
|
||||
");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current date / time minus a given amount of time.
|
||||
*/
|
||||
public function minus(
|
||||
int $years = 0,
|
||||
int $months = 0,
|
||||
int $weeks = 0,
|
||||
int $days = 0,
|
||||
int $hours = 0,
|
||||
int $minutes = 0,
|
||||
int $seconds = 0,
|
||||
int $microseconds = 0
|
||||
): static {
|
||||
return $this->sub("
|
||||
$years years $months months $weeks weeks $days days
|
||||
$hours hours $minutes minutes $seconds seconds $microseconds microseconds
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user