formatDate
function, since version 1.0.0
categories: date, converting
formatDate(format, datetime)
Converts datetime object to string representation
parameters
- format: string - format, see this documention for list of format option
- datetime: datetime - datetime object to be converted to string
return type:
string
examples
formatDate('c', now())
formatDate('d.m.Y', now())
formatDate('d.m.Y', now())
formatDate('H:i:s', now())
returns
2017-01-26T03:35:55-05:00
2017-01-26
26.1.2017
03:35:55