API15:JDate/toFormat
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Gets the date in a specific format
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
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
a date in a specific format
Defined in
libraries/joomla/utilities/date.php
Importing
jimport( 'joomla.utilities.date' );
Source Body
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
<CodeExamplesForm />
