Skip to content

cDateStrategySimpleDate::__construct()

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

Method __construct( )

 public   \libdatephp\cDateStrategy libdatephp\cDateStrategy::__construct($start_date, $end_date, $language, $directionOnSaturday, $directionOnSunday, $directionOnCelebrity, $directionOnHoliday, $directionOnImpossible)

The constructor of cDateStrategy

Example:

Arguments

  • $start_date mixed - <p>cDate the date, from which the calcultions should start. If it is null, then the actual date will be used. $start_date defaults to null</p>
  • $end_date mixed - <p>cDate the date, where the calcultions should stop. If it is null, then there is no ending date for the calculations. $end_date defaults to null</p>
  • $language mixed - <p>string the language for messages. ('de_de', 'en_en' or 'fr_fr'). It defaults to 'en_en'.</p>
  • $directionOnSaturday mixed - <p>int controls how to proceed, when the algorithm encounters a saturday. It defaults to self::STRATEGY_DIRECTION_LEAVE.</p>
  • $directionOnSunday mixed - <p>int controls how to proceed, when the algorithm encounters a sunday. It defaults to self::STRATEGY_DIRECTION_LEAVE.</p>
  • $directionOnCelebrity mixed - <p>int controls how to proceed, when the algorithm encounters a celebrity. It defaults to self::STRATEGY_DIRECTION_LEAVE.</p>
  • $directionOnHoliday mixed
  • $directionOnImpossible mixed - <p>int controls how to proceed, when the algorithm encounters an impossible situation. It defaults to self::STRATEGY_DIRECTION_FORWARD.</p>

Returns

\libdatephp\cDateStrategy 

Clone this wiki locally