Skip to content

cPeriod::AddWeeks()

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

Method AddWeeks( )

 public   mixed libdatephp\cPeriod::AddWeeks(integer $i)

AddWeeks() adds $i weeks to the boundaries. Starting date and ending date are moved

Example:

use libdatephp;

$p1 = new cPeriod( new cDate( 11, 23, 2016 ), new cDate( 11, 25, 2016 ) );

echo $p1->AddWeeks( 4 );

Arguments

  • $i integer - <p>how much weeks the managed period of time should be moved, can be negative. $i defaults to 1</p>

Clone this wiki locally