Actions

API16

JDate

From Joomla! Documentation

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

[Edit Descripton] Description:JDate

Contents

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' );

[Edit See Also] SeeAlso:JDate

Examples

<CodeExamplesForm />