<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
$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;
static function getDateFormat($formatType = NULL) {
$format = NULL;
if ($formatType) {
- $format = CRM_Core_Dao::getFieldValue('CRM_Core_DAO_PreferencesDate',
+ $format = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_PreferencesDate',
$formatType, 'date_format', 'name'
);
}