class Time

CEO Time utilities

Methods

boolean
isValidTimestamp(mixed $ts)

Determine if a value is a valid timestamp

Carbon
toDateTime($ts, $format = null)

Parse string or int as a Carbon/DateTime object

Carbon
now()

Return the current time as a Carbon object

Details

at line line 19
boolean isValidTimestamp(mixed $ts)

Determine if a value is a valid timestamp

Parameters

mixed $ts Timestamp/string to check

Return Value

boolean

See also

http://stackoverflow.com/a/2524761/1246248

at line line 33
Carbon toDateTime($ts, $format = null)

Parse string or int as a Carbon/DateTime object

Parameters

$ts
$format

Return Value

Carbon

Exceptions

Exception If unable to parse timestamp as string or int

at line line 50
Carbon now()

Return the current time as a Carbon object

Return Value

Carbon