API16:JDate
From Joomla! Documentation
Defined in
libraries/joomla/utilities/date.php
Methods
| Method name | Description |
|---|---|
| __construct | Constructor. |
| __toString | Magic method to render the date object in the format specified in the public static member JDate::$format. |
| getOffsetFromGMT | Get the time offset from GMT in hours or seconds. |
| format | Gets the date as a formatted string. |
| toRFC822 | Gets the date as an RFC 822 string. IETF RFC 2822 supercedes RFC 822 and its definition can be found at the IETF Web site. |
| toISO8601 | Gets the date as an ISO 8601 string. IETF RFC 3339 defines the ISO 8601 format and it can be found at the IETF Web site. |
| toMySQL | Gets the date as an MySQL datetime string. |
| toUnix | Gets the date as UNIX time stamp. |
| setTimezone | Method to wrap the setTimezone() function and set the internal time zone object. |
| setOffset | Set the date offset (in hours). |
| toFormat | Gets the date in a specific format |
Importing
jimport( 'joomla.utilities.date' );
Examples
Code Examples