-
Notifications
You must be signed in to change notification settings - Fork 0
cDate::SetWOQ()
Rainer Stötter edited this page May 9, 2017
·
1 revision
public mixed libdatephp\cDate::SetWOQ(integer $w, integer $wd)
- Namespace : libdatephp
- Class name: cDate
- This method is defined by libdatephp\cDate
SetWOQ() sets the date to the monday of the $w-th week in the actual quarter and searches then the first day of week $wd
week numbers are one-based and start with 1. The first week in the year has the number 1
Example:
$dt = new \libdatephp\cDate( 1, 1, 2017 );
assert( $dt->WOM( ) == 1 );
echo "\n wom = " . $dt->WOM();
$dt->GoWOM( 5 );
assert( $dt->WOM( ) == 5 );
$dt = new \libdatephp\cDate( 1, 1, 2017 );
$dt->GoWOM( 5, \libdatephp\cDate::DOW_THURSDAY );
assert( $dt->IsThursday( ) );
assert( $dt->eq( new \libdatephp\cDate( 2,2,2017) ) );
- $w integer - <p>the week number to set in the actual quarter</p>
- $wd integer - <p>the day of week to search. Defaults to DOW_MONDAY</p>
This wiki page is part of the documentation of the PHP class library libdatephp