crm-16954-change-to-next-30-90-last-90-days
authorjoannechester <j_chester@optusnet.com.au>
Mon, 3 Aug 2015 13:04:20 +0000 (23:04 +1000)
committerjoannechester <j_chester@optusnet.com.au>
Wed, 26 Aug 2015 11:56:48 +0000 (21:56 +1000)
CRM/Core/Form/Date.php
CRM/Utils/Date.php

index 0c8cc01d8fd759e1ab59c6f6c243100d966fd73f..02d27cb57c8c7e800693bfd5eaedb1eb1b6f5284 100644 (file)
@@ -171,7 +171,7 @@ class CRM_Core_Form_Date {
       'ending_3.year' => ts('Last 3 years including today'),
       'ending_2.year' => ts('Last 2 years including today'),
       'ending.year' => ts('Last 12 months including today'),
-      'ending.quarter' => ts('Last 3 months including today'),
+      'ending.quarter' => ts('Last 90 days including today'),
       'ending.month' => ts('Last 30 days including today'),
       'ending.week' => ts('Last 7 days including today'),
       'previous.day' => ts('Yesterday'),
@@ -183,7 +183,8 @@ class CRM_Core_Form_Date {
       'this.day' => ts('Today'),
       'starting.day' => ts('Tomorrow'),
       'starting.week' => ts('Next 7 days including today'),
-      'starting.month' => ts('Next month including today'),
+      'starting.month' => ts('Next 30 days including today'),
+      'starting.quarter' => ts('Next 90 days including today'),
       'starting.year' => ts('Next 12 months including today'),
       'less.year' => ts('To end of current calendar year'),
       'less.quarter' => ts('To end of current quarter'),
index fce84cf8b015dc0272bffd6dccac9436594933d8..3a5e59403ff1f011253a5ed9052c6a01f44c40de 100644 (file)
@@ -1263,7 +1263,7 @@ class CRM_Utils_Date {
             $to['Y'] = $now['year'];
             $to['H'] = 23;
             $to['i'] = $to['s'] = 59;
-            $from = self::intervalAdd('month', -3, $to);
+            $from = self::intervalAdd('day', -90, $to);
             $from = self::intervalAdd('second', 1, $from);
             break;
 
@@ -1307,6 +1307,16 @@ class CRM_Utils_Date {
             $to['Y'] = $from['Y'] = $now['year'] - $subtractYear;
             $to['d'] = date('t', mktime(0, 0, 0, $to['M'], 1, $to['Y']));
             break;
+
+          case 'starting':
+            $from['d'] = $now['mday'];
+            $from['M'] = $now['mon'];
+            $from['Y'] = $now['year'];
+            $from['H'] = 00;
+            $from['i'] = $to['s'] = 00;
+            $to = self::intervalAdd('day', 90, $from);
+            $to = self::intervalAdd('second', -1, $to);
+            break;
         }
         break;
 
@@ -1448,13 +1458,13 @@ class CRM_Utils_Date {
             break;
 
           case 'starting':
-            $from['d'] = $now['mday'];
-            $from['M'] = $now['mon'];
-            $from['Y'] = $now['year'];
-            $from['H'] = 00;
-            $from['i'] = $to['s'] = 00;
-            $to = self::intervalAdd('month', 1, $from);
-            $to = self::intervalAdd('second', -1, $to);
+              $from['d'] = $now['mday'];
+              $from['M'] = $now['mon'];
+              $from['Y'] = $now['year'];
+              $from['H'] = 00;
+              $from['i'] = $to['s'] = 00;
+              $to = self::intervalAdd('day', 30, $from);
+              $to = self::intervalAdd('second', -1, $to);
             break;
         }
         break;