JDate: Difference between revisions
From Joomla! Documentation
m moving preparation |
m clean up |
||
| Line 2: | Line 2: | ||
=={{JVer|11.1}} JDate== | =={{JVer|11.1}} JDate== | ||
===Description=== | ===Description=== | ||
{{Description:JDate}} | {{subst:Description:JDate}} | ||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
| Line 81: | Line 79: | ||
* {{JVer|11.1}} Subpackage [[API17:Subpackage Utilities|Utilities]] | * {{JVer|11.1}} Subpackage [[API17:Subpackage Utilities|Utilities]] | ||
* [[API17:JDate|Other versions of JDate]] | * [[API17:JDate|Other versions of JDate]] | ||
{{SeeAlso:JDate}} | {{subst:SeeAlso:JDate}} | ||
===User contributed notes=== | ===User contributed notes=== | ||
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
Revision as of 15:16, 24 March 2017
JDate
Description
{{subst:Description:JDate}}
Methods
| Visibility | Method name | Description |
|---|---|---|
| public | __construct | Constructor. |
| public | __get | Magic method to access properties of the date given by class to the format method. |
| public | __toString | Magic method to render the date object in the format specified in the public static member JDate::$format. |
| public | calendar | Gets the date as a formatted string in a local calendar. |
| public | format | Gets the date as a formatted string. |
| public | getOffsetFromGMT | Get the time offset from GMT in hours or seconds. |
| public | setOffset | Set the date offset (in hours). |
| public | setTimezone | Method to wrap the function and set the internal time zone object. |
| public | toFormat | Gets the date in a specific format. |
| public | toISO8601 | Gets the date as an ISO 8601 string. |
| public | toMySQL | Gets the date as an MySQL datetime string. |
| public | toRFC822 | Gets the date as an RFC 822 string. |
| public | toUnix | Gets the date as UNIX time stamp. |
| protected | dayToString | Translates day of week number to a string. |
| protected | monthToString | Translates month number to a string. |
- Defined in libraries/joomla/utilities/date.php
Importing
jimport( 'joomla.utilities.date' );
See also
JDate source code on BitBucket
Subpackage Utilities- Other versions of JDate
{{subst:SeeAlso:JDate}}
User contributed notes
<CodeExamplesForm />