Skip to content

cDateTime::Year()

Rainer Stötter edited this page Apr 28, 2017 · 9 revisions

Method Year( )

 public   integer libdatephp\cDateTime::Year()

Year( ) returns the four-digit year part of the timestamp

Example:

use libdatephp;

$dtm = new cDateTime( '2016-12-22 05:00:00' );

echo $dtm->Year( );

Returns

integer the year part of the timestamp

Clone this wiki locally