'current.quarter' => ts('Current Quarter to-date'),
'current.month' => ts('Current Month to-date'),
'current.week' => ts('Current Week to-date'),
+ 'ending_3.year' => ts('Last 3 Years'),
+ 'ending_2.year' => ts('Last 2 Years'),
'ending.year' => ts('Last 12 Months'),
'ending.quarter' => ts('Last 3 Months'),
'ending.month' => ts('Last Month'),
$to['M'] = $now['mon'];
$to['Y'] = $now['year'];
break;
+
+ case 'ending_2':
+ $to['d'] = $now['mday'];
+ $to['M'] = $now['mon'];
+ $to['Y'] = $now['year'];
+ $to['H'] = 23;
+ $to['i'] = $to['s'] = 59;
+ $from = self::intervalAdd('year', -2, $to);
+ $from = self::intervalAdd('second', 1, $from);
+ break;
+
+ case 'ending_3':
+ $to['d'] = $now['mday'];
+ $to['M'] = $now['mon'];
+ $to['Y'] = $now['year'];
+ $to['H'] = 23;
+ $to['i'] = $to['s'] = 59;
+ $from = self::intervalAdd('year', -3, $to);
+ $from = self::intervalAdd('second', 1, $from);
+ break;
}
break;