feat(helpers): add formatTime
This commit is contained in:
parent
32468f9e8c
commit
04f936ef08
@ -9,6 +9,13 @@ function formatDate(?string $date = null, ?string $format = 'l, d M Y')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! function_exists('formatTime')) {
|
||||||
|
function formatTime(?string $time = null, ?string $format = 'H:i')
|
||||||
|
{
|
||||||
|
return ! $time ? '-' : Carbon::parse($time)->format($format);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (! function_exists('formatDateTime')) {
|
if (! function_exists('formatDateTime')) {
|
||||||
function formatDateTime(string $dateTime)
|
function formatDateTime(string $dateTime)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user