diff --git a/src/Illuminate/Support/functions.php b/src/Illuminate/Support/functions.php index 6ae16a07599e..0e5e5ff8f80c 100644 --- a/src/Illuminate/Support/functions.php +++ b/src/Illuminate/Support/functions.php @@ -66,6 +66,26 @@ function now($tz = null): CarbonInterface } } +if (! function_exists('Illuminate\Support\microseconds')) { + /** + * Get the current date / time plus the given number of microseconds. + */ + function microseconds(int $microseconds): CarbonInterval + { + return CarbonInterval::microseconds($microseconds); + } +} + +if (! function_exists('Illuminate\Support\milliseconds')) { + /** + * Get the current date / time plus the given number of milliseconds. + */ + function milliseconds(int $milliseconds): CarbonInterval + { + return CarbonInterval::milliseconds($milliseconds); + } +} + if (! function_exists('Illuminate\Support\seconds')) { /** * Get the current date / time plus the given number of seconds. @@ -106,6 +126,26 @@ function days(int $days): CarbonInterval } } +if (! function_exists('Illuminate\Support\weeks')) { + /** + * Get the current date / time plus the given number of weeks. + */ + function weeks(int $weeks): CarbonInterval + { + return CarbonInterval::weeks($weeks); + } +} + +if (! function_exists('Illuminate\Support\months')) { + /** + * Get the current date / time plus the given number of months. + */ + function months(int $months): CarbonInterval + { + return CarbonInterval::months($months); + } +} + if (! function_exists('Illuminate\Support\years')) { /** * Get the current date / time plus the given number of years.