mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
note to self, remember to make a diff first
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6238 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
1ee0b564e1
commit
66fc807b93
1 changed files with 0 additions and 31 deletions
|
@ -435,37 +435,6 @@ class TimeHelper extends AppHelper {
|
|||
$return = gmmktime($hour, $minute, $second, $month, $day, $year);
|
||||
return $return;
|
||||
}
|
||||
/**
|
||||
* Returns a UNIX timestamp, given either a UNIX timestamp or a valid strtotime() date string.
|
||||
*
|
||||
* @param string $date_string Datetime string
|
||||
* @return string Formatted date string
|
||||
*/
|
||||
function getQuarterRange($date_string = null) {
|
||||
if ($date_string == null) {
|
||||
$date_string = time();
|
||||
}
|
||||
|
||||
$year = $this->format('Y', $date_string);
|
||||
$q = $this->toQuarter($date_string);
|
||||
|
||||
switch ($q) {
|
||||
case 1:
|
||||
$ret = array($year.'-01-01', $year.'-03-31');
|
||||
break;
|
||||
case 2:
|
||||
$ret = array($year.'-04-01', $year.'-06-30');
|
||||
break;
|
||||
case 3:
|
||||
$ret = array($year.'-07-01', $year.'-09-30');
|
||||
break;
|
||||
case 4:
|
||||
$ret = array($year.'-10-01', $year.'-12-31');
|
||||
break;
|
||||
}
|
||||
|
||||
return $this->output($ret);
|
||||
}
|
||||
/**
|
||||
* Returns a UNIX timestamp, given either a UNIX timestamp or a valid strtotime() date string.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue