We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CarbonInterface
asDateTime
1 parent 3f8ce6c commit 91caf42Copy full SHA for 91caf42
src/Concerns/HasCasts.php
@@ -344,15 +344,15 @@ protected function asTimestamp(mixed $value): int
344
/**
345
* Return a timestamp as DateTime object with time set to 00:00:00.
346
*/
347
- protected function asDate(mixed $value): Carbon
+ protected function asDate(mixed $value): CarbonInterface
348
{
349
return $this->asDateTime($value)->startOfDay();
350
}
351
352
353
* Return a timestamp as DateTime object.
354
355
- protected function asDateTime(mixed $value): Carbon
+ protected function asDateTime(mixed $value): CarbonInterface
356
357
if ($value instanceof CarbonInterface) {
358
return Date::instance($value);
0 commit comments