Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/Illuminate/Support/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
Loading