Difference between revisions of "JHtml::date"
From Joomla! Documentation
(Layout updates) |
m (preparing for archive only) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
Returns formated date according to a given format and time zone. | Returns formated date according to a given format and time zone. | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
<source lang="php"> | <source lang="php"> | ||
− | public static | + | public static function date ( |
+ | $input= 'now' | ||
+ | $format=null | ||
+ | $tz=true | ||
+ | $gregorian=false | ||
+ | ) | ||
</source> | </source> | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 42: | Line 42: | ||
|- | |- | ||
|} | |} | ||
− | + | * '''Returns''' string A date translated by the given format and time zone. | |
− | string A date translated by the given format and time zone. | + | * '''Defined''' on line 567 of libraries/joomla/html/html.php |
− | + | * '''Since''' {{JVer|11.1 }} | |
− | libraries/joomla/html/html.php | ||
− | * | ||
− | |||
===See also=== | ===See also=== | ||
− | + | * {{JVer|11.1}} '''JHtml::date source code''' on [[jplatform:html/html.php#cl-559|BitBucket]] | |
− | + | * {{JVer|11.1}} Class [[API17:JHtml|JHtml]] | |
− | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Html|Html]] | |
− | * | + | * [[API17:JHtml::date|Other versions of JHtml::date]] |
− | * [[JHtml::date|Other versions of | + | |
− | + | ||
− | ===Examples=== | + | ===User contributed notes=== |
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JHtml::date | category=JHtml::date | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
+ | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude>[[Category: | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 22:10, 24 March 2017
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JHtml::date[edit]
Description[edit]
Returns formated date according to a given format and time zone.
public static function date (
$input= 'now'
$format=null
$tz=true
$gregorian=false
)
Parameter | Type | Default | Description |
---|---|---|---|
$input | string | 'now' | String in a format accepted by , defaults to "now". |
$format | string | null | format optional format for strftime |
$tz | mixed | true | Time zone to be used for the date. Special cases: boolean true for user setting, boolean false for server setting. |
$gregorian | false |
- Returns string A date translated by the given format and time zone.
- Defined on line 567 of libraries/joomla/html/html.php
- Since
See also[edit]
- JHtml::date source code on BitBucket
- Class JHtml
- Subpackage Html
- Other versions of JHtml::date
User contributed notes[edit]
Code Examples[edit]