JDate: Difference between revisions
From Joomla! Documentation
m →User contributed notes: moving preparation |
m moving preparation |
||
| Line 14: | Line 14: | ||
|- | |- | ||
|public | |public | ||
|[[JDate::__construct | |[[API17:JDate::__construct|__construct]] | ||
|Constructor. | |Constructor. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::__get | |[[API17:JDate::__get|__get]] | ||
|Magic method to access properties of the date given by class to the format method. | |Magic method to access properties of the date given by class to the format method. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::__toString | |[[API17:JDate::__toString|__toString]] | ||
|Magic method to render the date object in the format specified in the public static member JDate::$format. | |Magic method to render the date object in the format specified in the public static member JDate::$format. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::calendar | |[[API17:JDate::calendar|calendar]] | ||
|Gets the date as a formatted string in a local calendar. | |Gets the date as a formatted string in a local calendar. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::format | |[[API17:JDate::format|format]] | ||
|Gets the date as a formatted string. | |Gets the date as a formatted string. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::getOffsetFromGMT | |[[API17:JDate::getOffsetFromGMT|getOffsetFromGMT]] | ||
|Get the time offset from GMT in hours or seconds. | |Get the time offset from GMT in hours or seconds. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::setOffset | |[[API17:JDate::setOffset|setOffset]] | ||
|Set the date offset (in hours). | |Set the date offset (in hours). | ||
|- | |- | ||
|public | |public | ||
|[[JDate::setTimezone | |[[API17:JDate::setTimezone|setTimezone]] | ||
|Method to wrap the function and set the internal time zone object. | |Method to wrap the function and set the internal time zone object. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::toFormat | |[[API17:JDate::toFormat|toFormat]] | ||
|Gets the date in a specific format. | |Gets the date in a specific format. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::toISO8601 | |[[API17:JDate::toISO8601|toISO8601]] | ||
|Gets the date as an ISO 8601 string. | |Gets the date as an ISO 8601 string. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::toMySQL | |[[API17:JDate::toMySQL|toMySQL]] | ||
|Gets the date as an MySQL datetime string. | |Gets the date as an MySQL datetime string. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::toRFC822 | |[[API17:JDate::toRFC822|toRFC822]] | ||
|Gets the date as an RFC 822 string. | |Gets the date as an RFC 822 string. | ||
|- | |- | ||
|public | |public | ||
|[[JDate::toUnix | |[[API17:JDate::toUnix|toUnix]] | ||
|Gets the date as UNIX time stamp. | |Gets the date as UNIX time stamp. | ||
|- | |- | ||
|protected | |protected | ||
|[[JDate::dayToString | |[[API17:JDate::dayToString|dayToString]] | ||
|Translates day of week number to a string. | |Translates day of week number to a string. | ||
|- | |- | ||
|protected | |protected | ||
|[[JDate::monthToString | |[[API17:JDate::monthToString|monthToString]] | ||
|Translates month number to a string. | |Translates month number to a string. | ||
|- | |- | ||
| Line 79: | Line 79: | ||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JDate source code''' on [[jplatform:utilities/date.php|BitBucket]] | * {{JVer|11.1}} '''JDate source code''' on [[jplatform:utilities/date.php|BitBucket]] | ||
* {{JVer|11.1}} Subpackage [[Subpackage Utilities | * {{JVer|11.1}} Subpackage [[API17:Subpackage Utilities|Utilities]] | ||
* [[JDate|Other versions of JDate]] | * [[API17:JDate|Other versions of JDate]] | ||
{{SeeAlso:JDate}} | {{SeeAlso:JDate}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
Revision as of 01:25, 12 May 2013
JDate
Description
Template:Description:JDate [Edit Descripton]
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
Template:SeeAlso:JDate [Edit See Also]
User contributed notes
<CodeExamplesForm />