Example #1
0
 /**
  * Sets the PHP constant for the week start day.
  * This must be called as
  * early as possible to avoid PEAR Date defining its default instead.
  *
  * @return void
  */
 public function setWeekStartDay()
 {
     if ($this->cObj->data['pi_flexform']) {
         $this->pi_initPIflexForm();
         // Init and get the flexform data of the plugin
         $piFlexForm = $this->cObj->data['pi_flexform'];
         if ($this->conf['dontListenToFlexForm.']['day.']['weekStartDay'] != 1) {
             Controller::updateIfNotEmpty($this->conf['view.']['weekStartDay'], $this->pi_getFFvalue($piFlexForm, 'weekStartDay'));
         }
     }
     define('DATE_CALC_BEGIN_WEEKDAY', $this->conf['view.']['weekStartDay'] == 'Sunday' ? 0 : 1);
 }