\Ceo\Core\UtilTime

CEO Time utilities

Summary

Methods
Properties
Constants
isValidTimestamp()
toDateTime()
now()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

isValidTimestamp()

isValidTimestamp(mixed  $ts) : boolean

Determine if a value is a valid timestamp

Parameters

mixed $ts

Timestamp/string to check

Returns

boolean

toDateTime()

toDateTime(mixed  $ts,   $format = null) : \Carbon\Carbon

Parse string or int as a Carbon/DateTime object

Parameters

mixed $ts

Timestamp or string

$format

Throws

\Ceo\Core\Util\Exception

If unable to parse timestamp as string or int

Returns

\Carbon\Carbon

now()

now() : \Carbon\Carbon

Return the current time as a Carbon object

Returns

\Carbon\Carbon