Skip to content

cPeriod::ForEachDate()

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

Method ForEachDate( )

 public   mixed libdatephp\cPeriod::ForEachDate(string $func)

ForEachDate() execute the function $func on each date in the managed period of time

Example:

use libdatephp;

function myfunc( $dt ) { echo "\n" . $dt->AsSQL( ); }

$p1 = new cPeriod( new cDate( 11, 23, 2016 ), new cDate( 11, 25, 2016 ) ); $func = "myfunc"; $p1->ForEachDate( $func );

Arguments

  • $func string - <p>the function pointer</p>

See also

Clone this wiki locally