6.5.1. Generating Date Strings Using toString()
The toString()
method automatically formats the date object according to the conventions of the object's locale, or an optionally specified $locale
.
6.5.2. toValue() - Partial Dates as Integers
To obtain an integer for some part of the date, use toValue($part)
.
6.5.3. get() - Partial Dates as Localized Strings
get($part = null, $locale = null)
This method returns the $part
of object's date localized to $locale
as a formatted string or integer