protected function statspro::get_first_day_of_quarter_from_reference in Statistics Pro 6
Same name and namespace in other branches
- 6.2 statspro.inc \StatsPro::get_first_day_of_quarter_from_reference()
Returns a YYYYMMDD date representation of the first day of same the quarter as the reference day.
Parameters
<int> $reference A timestamp representaing the reference day.:
Return value
<int> First day of the same quarter of the reference day.
1 call to statspro::get_first_day_of_quarter_from_reference()
- statspro::get_period in ./
statspro.inc - Generate SQL fragment for period query.
File
- ./
statspro.inc, line 280 - statspro class for statistics pro module.
Class
- statspro
- Manages the data saving and retrieval according to the user defined parameters.
Code
protected function get_first_day_of_quarter_from_reference($reference) {
$year = date('Y', $reference);
$first_month_of_quarter = $this
->get_first_month_of_quarter_from_reference($reference);
$first = sprintf('%04u%02u01', $year, $first_month_of_quarter);
return $first;
}