CRM-16227: Change last month filter to last 30 days
authorJKingsnorth <john@johnkingsnorth.co.uk>
Wed, 15 Apr 2015 09:48:23 +0000 (10:48 +0100)
committerJKingsnorth <john@johnkingsnorth.co.uk>
Wed, 15 Apr 2015 09:48:23 +0000 (10:48 +0100)
CRM/Core/Form/Date.php
CRM/Utils/Date.php

index adca08b3231a739d92415d77054c24da8e1deabf..5fce6cddd95712246a487ae9c9e7a7aa61ed43e3 100644 (file)
@@ -172,7 +172,7 @@ class CRM_Core_Form_Date {
       'ending_2.year' => ts('Last 2 Years'),
       'ending.year' => ts('Last 12 Months'),
       'ending.quarter' => ts('Last 3 Months'),
-      'ending.month' => ts('Last Month'),
+      'ending.month' => ts('Last 30 days'),
       'ending.week' => ts('Last 7 days'),
       'previous.day' => ts('Yesterday'),
       'this.year' => ts('This Year'),
index 73964961e326cf0ab44526d9faebf0f070319af6..f58994f6b3b1dfcabb65da9873923282072718b3 100644 (file)
@@ -1395,7 +1395,7 @@ class CRM_Utils_Date {
             $to['Y'] = $now['year'];
             $to['H'] = 23;
             $to['i'] = $to['s'] = 59;
-            $from = self::intervalAdd('month', -1, $to);
+            $from = self::intervalAdd('day', -30, $to);
             $from = self::intervalAdd('second', 1, $from);
             break;