Skip to content

cPeriod::AsString()

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

Method AsString( )

 public   string libdatephp\cPeriod::AsString(integer $representation)

AsString() returns a string of the period of time in day.month.year notation.

Example:

use libdatephp;

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

echo $p->AsString( );

Arguments

  • $representation integer - <p>how the output string should be formatted - defaults to self::Representation_DMY ( DMY notation). Can be set to Representation_MDY or Representation_SQL, too</p>

Returns

string a string with the dates of the period of time

Clone this wiki locally