JDate/toFormat
From Joomla! Documentation
< API15:JDateRevision as of 09:02, 12 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)
Revision as of 09:02, 12 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)
The "API15" 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.
Description[edit]
Gets the date in a specific format
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax[edit]
toFormat($format= '%Y-%m-%d%H:%M:%S')
Parameter Name | Default Value | Description |
---|---|---|
$format | '%Y-%m-%d%H:%M:%S' | $format The date format specification string (see ) |
Returns[edit]
a date in a specific format
Defined in[edit]
libraries/joomla/utilities/date.php
Importing[edit]
jimport( 'joomla.utilities.date' );
Source Body[edit]
function toFormat($format = '%Y-%m-%d %H:%M:%S')
{
$date = ($this->_date !== false) ? $this->_strftime($format, $this->_date + $this->_offset) : null;
return $date;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples[edit]
<CodeExamplesForm />