briannesbitt/Carbon · error · UnknownMethodException
%s::%s
Error message
%s::%s
What it means
Error "%s::%s" thrown in briannesbitt/Carbon.
Source
Thrown at src/Carbon/Traits/Date.php:2507
*
* @param string $method magic method name called
* @param array $parameters parameters list
*
* @throws BadMethodCallException
*/
public static function __callStatic(string $method, array $parameters): mixed
{
if (!static::hasMacro($method)) {
foreach (static::getGenericMacros() as $callback) {
try {
return static::executeStaticCallable($callback, $method, ...$parameters);
} catch (BadMethodCallException) {
continue;
}
}
if (static::isStrictModeEnabled()) {
throw new UnknownMethodException(\sprintf('%s::%s', static::class, $method));
}
return null;
}
return static::executeStaticCallable(static::getMacro($method), ...$parameters);
}
/**
* Set specified unit to new given value.
*
* @param string $unit year, month, day, hour, minute, second or microsecond
* @param Month|int|float|null $value new value for given unit
* @param OverflowMode|bool|null $overflow either overflow (when the day does not exist in current month)
* is allowed or not, or should use an anchor day
* @param ?int $anchorDay the day to which to go after setting year/quarter/month,
* if given but it does not exist in current month, it will
* go to the last day of the monthView on GitHub (pinned to b13f05955d)
When it happens
Trigger: Thrown at src/Carbon/Traits/Date.php:2507 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of briannesbitt/Carbon@b13f05955d (2026-08-17).
Data as JSON: /api/errors/ad3928415ec19b41.
Report an issue: GitHub.