-
Notifications
You must be signed in to change notification settings - Fork 0
cDate::SetYear()
Rainer Stötter edited this page May 9, 2017
·
15 revisions
public mixed libdatephp\cDate::SetYear(integer $y)
- Namespace : libdatephp
- Class name: cDate
- This method is defined by libdatephp\cDate
SetYear() sets the year part of the date
Example:
$dt = new \libdatephp\cDate( 1, 1, 2014 );
for ( $i = 2013; $i < 2021; $i++ ) {
$dt->SetYear( $i );
$woy = $dt->WeeksOfYear( );
$dt = $dt->FirstWeekOfYearISO( );
echo "\n The first week of the ISO year " . $i . ' starts on the ' . $dt->AsSQL( );
echo '. The year has ' . $woy . ' calendar weeks ';
}
- $y integer - <p>the year part</p>
This wiki page is part of the documentation of the PHP class library libdatephp