Esempio n. 1
0
 public function __construct()
 {
     //Override module_name to distinguish bean for BeanFactory
     $this->module_name = 'QuarterTimePeriods';
     parent::__construct();
     //The time period type
     $this->type = TimePeriod::QUARTER_TYPE;
     //The leaf period type
     $this->leaf_period_type = TimePeriod::MONTH_TYPE;
     //The number of leaf periods
     $this->leaf_periods = 3;
     //The number of periods in a year
     $this->periods_in_year = 4;
     //Fiscal is 52-week based, chronological is year based
     $this->is_fiscal = false;
     $this->is_fiscal_year = false;
     //The next period modifier
     $this->next_date_modifier = '3 month';
     //The previous period modifier
     $this->previous_date_modifier = '-3 month';
     //The name template
     global $app_strings;
     $this->name_template = $app_strings['LBL_QUARTER_TIMEPERIOD_FORMAT'];
     //The leaf name template
     $this->leaf_name_template = $app_strings['LBL_MONTH_TIMEPERIOD_FORMAT'];
     //The chart label
     $this->chart_label = "F Y";
     //The date formatting key for chart labels
     $this->chart_data_key = "m-Y";
     //The chart data interval modifier
     $this->chart_data_modifier = '+1 month';
 }
 /**
  * constructor override
  *
  * @param null $start_date date string to set the start date of the quarter time period
  */
 public function __construct($start_date = null)
 {
     parent::__construct();
     //set defaults
     $this->type = 'Quarter445';
     $this->is_fiscal = true;
     $this->date_modifier = '13 week';
 }
Esempio n. 3
0
 public function __construct()
 {
     //Override module_name to distinguish bean for BeanFactory
     $this->module_name = 'MonthTimePeriods';
     parent::__construct();
     //The time period type
     $this->type = TimePeriod::MONTH_TYPE;
     //Fiscal is 52-week based, chronological is year based
     $this->is_fiscal = false;
     $this->is_fiscal_year = false;
     //The number of periods in a year
     $this->periods_in_year = 12;
     //The next period modifier
     $this->next_date_modifier = '1 month';
     //The previous period modifier
     $this->previous_date_modifier = '-1 month';
     //The name template
     global $app_strings;
     $this->name_template = $app_strings['LBL_MONTH_TIMEPERIOD_FORMAT'];
     //The chart label
     $this->chart_label = "n/j";
     //The chart data interval modifier
     $this->chart_data_modifier = '+1 week';
 }
Esempio n. 4
0
 public function __construct()
 {
     $this->module_name = 'AnnualTimePeriods';
     parent::__construct();
     //The time period type
     $this->type = TimePeriod::ANNUAL_TYPE;
     //The leaf period type
     $this->leaf_period_type = TimePeriod::QUARTER_TYPE;
     //The number of leaf periods
     $this->leaf_periods = 4;
     $this->periods_in_year = 1;
     //Fiscal is 52-week based, chronological is year based
     $this->is_fiscal = false;
     $this->is_fiscal_year = true;
     //The next period modifier
     $this->next_date_modifier = $this->is_fiscal ? '52 week' : '1 year';
     //The previous period modifier
     $this->previous_date_modifier = $this->is_fiscal ? '-52 week' : '-1 year';
     global $app_strings;
     //The name template
     $this->name_template = $app_strings['LBL_ANNUAL_TIMEPERIOD_FORMAT'];
     //The leaf name template
     $this->leaf_name_template = $app_strings['LBL_QUARTER_TIMEPERIOD_FORMAT'];
 }