Skip to content

cPeriod::AddMonths()

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

Method AddMonths( )

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

AddMonths() adds $i months 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->AddMonths( 3 );

Arguments

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

Clone this wiki locally