API15

JDate/toUnix

From Joomla! Documentation

< API15:JDate
Revision as of 17:25, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Gets the date as UNIX time stamp. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 as UNIX time stamp.

[Edit Descripton]

Template:Description:JDate/toUnix

Syntax[edit]

toUnix($local=false)
Parameter Name Default Value Description
$local false

Returns[edit]

a date as a unix time stamp

Defined in[edit]

libraries/joomla/utilities/date.php

Importing[edit]

jimport( 'joomla.utilities.date' );

Source Body[edit]

function toUnix($local = false)
{
        $date = null;
        if ($this->_date !== false) {
                $date = ($local) ? $this->_date + $this->_offset : $this->_date;
        }
        return $date;
}

[Edit See Also] Template:SeeAlso:JDate/toUnix

Examples[edit]

<CodeExamplesForm />