Skip to content

cPeriod::SameStart()

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

Method SameStart( )

 public   boolean libdatephp\cPeriod::SameStart(mixed $obj)

SameStart() returns true, if $obj has the same starting date

Example:

use libdatephp;

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

if ( $p1->SameStart( $p2 ) ) do_something( );

Arguments

  • $obj mixed - <p>the other period of time or a cDate</p>

Returns

boolean true if both starting dates are equal

Clone this wiki locally