API17

JDate: Difference between revisions

From Joomla! Documentation

Doxiki2 (talk | contribs)
Updated to r1448:247ba8d88526
 
m preparing for archive only
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
=={{JVer|11.1}} JDate==
=={{JVer|11.1}} JDate==
===Description===
===Description===
{{Description:JDate}}
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[Description:JDate|Edit Descripton]]<nowiki>]</nowiki>
</span>
===Methods===
===Methods===
{| class="wikitable sortable"
{| class="wikitable sortable"
Line 14: Line 12:
|-
|-
|public  
|public  
|[[JDate::__construct/11.1|__construct]]
|[[API17:JDate::__construct|__construct]]
|Constructor.  
|Constructor.  
|-
|-
|public  
|public  
|[[JDate::__get/11.1|__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/11.1|__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/11.1|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/11.1|format]]
|[[API17:JDate::format|format]]
|Gets the date as a formatted string.  
|Gets the date as a formatted string.  
|-
|-
|public  
|public  
|[[JDate::getOffsetFromGMT/11.1|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/11.1|setOffset]]
|[[API17:JDate::setOffset|setOffset]]
|Set the date offset (in hours).  
|Set the date offset (in hours).  
|-
|-
|public  
|public  
|[[JDate::setTimezone/11.1|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/11.1|toFormat]]
|[[API17:JDate::toFormat|toFormat]]
|Gets the date in a specific format.  
|Gets the date in a specific format.  
|-
|-
|public  
|public  
|[[JDate::toISO8601/11.1|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/11.1|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/11.1|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/11.1|toUnix]]
|[[API17:JDate::toUnix|toUnix]]
|Gets the date as UNIX time stamp.  
|Gets the date as UNIX time stamp.  
|-
|-
|protected  
|protected  
|[[JDate::dayToString/11.1|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/11.1|monthToString]]
|[[API17:JDate::monthToString|monthToString]]
|Translates month number to a string.  
|Translates month number to a string.  
|-
|-
Line 79: Line 77:
===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/11.1|Utilities]]
* {{JVer|11.1}} Subpackage [[API17:Subpackage Utilities|Utilities]]
* [[JDate|Other versions of JDate]]
* [[API17:JDate|Other versions of JDate]]
{{SeeAlso:JDate}}
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JDate|Edit See Also]]<nowiki>]</nowiki>
</span>
===User contributed notes===
===User contributed notes===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
noresultsheader=\n
noresultsheader=\n
category=JDate
category=JDate
category=CodeExample
namespace=CodeExample
category=ClassExample
category=ClassExample
include=*
include=*
Line 96: Line 92:
format= ,,,
format= ,,,
</dpl>
</dpl>
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JDate]]</noinclude>
<noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude>

Latest revision as of 02:50, 25 March 2017

Joomla 11.1 JDate

Description

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


User contributed notes

Code Examples