TimeDate
class TimeDate extends Carbon
A class representing a timestamp
Constants
DATE_SHORT |
|
DATE_MEDIUM |
|
DATE_FULL |
|
TIMESTAMP |
|
TIMESTAMP_FULL |
|
FULL |
|
MYSQL |
|
Methods
string
diffForHumans(Carbon $other = null, bool $absolute = false)
Get the time difference in a human readable format.
string
toMysql()
Format the timestamp so that it can be used in mysql queries
static TimeDate
Details
at line line 24
string
diffForHumans(Carbon $other = null, bool $absolute = false)
Get the time difference in a human readable format.
at line line 36
string
toMysql()
Format the timestamp so that it can be used in mysql queries
at line line 50
static TimeDate
fromMysql(string $time)
Create a timestamp from a MySQL string
at line line 60
static TimeDate
from(string|DateTime $time)
Create a timestamp from a string or another object
at line line 75
static TimeDate
now(DateTimeZone|string $timezone = null)
Get a Carbon instance for the current date and time