-
Notifications
You must be signed in to change notification settings - Fork 0
cPeriod::__construct()
Rainer Stötter edited this page Apr 28, 2017
·
14 revisions
public \libdatephp\cPeriod libdatephp\cPeriod::__construct(mixed $a, mixed $b, integer $c, integer $d, integer $e, integer $f)
- Namespace : libdatephp
- Class name: cPeriod
- This method is defined by libdatephp\cPeriod
The constructor for the cPeriod class
$p = new cPeriod( 11, 22, 2016, 11, 23, 2016 ); from month, day, year, month, day, year
$p = new cPeriod( ); a period with today as start and length one day
$dtm = new cPeriod( new cDate( 11, 22, 2016 ) ); one day long period with the date as starting date
$dtm = new cPeriod( new cDate( 11, 22, 2016 ), 20 ); 20 days from the date as starting date
$dtm = new cPeriod( 20516, 30517 ); from two timestamps
$dtm = new cPeriod( new cDate( 11, 22, 2016 ), new cDate( 11, 25, 2016 ) ); from two dates
$dtm = new cPeriod( 11, 23, 2016 ); from a date
$dtm = new cPeriod( 11, 23, 2016, 20 ); 20 days from a date
- $a mixed - <p>can be an int as month or a timestamp or a cDate</p>
- $b mixed - <p>can be a date or an int as day or a cDate</p>
- $c integer - <p>the year of the first date</p>
- $d integer - <p>the month of the ending date</p>
- $e integer - <p>the day of the ending date</p>
- $f integer - <p>the year of the ending date</p>
\libdatephp\cPeriod
This wiki page is part of the documentation of the PHP class library libdatephp