Merge pull request #2909 from jake-mw/crm-14472
[civicrm-core.git] / CRM / Core / Form / Date.php
index f81ce4a57653f00d1e820812347ef0cc41cf7410..66f25e183439c82a677b8e201b4ab13026e68ee9 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -171,6 +171,8 @@ Class CRM_Core_Form_Date {
         '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'),
@@ -194,7 +196,7 @@ Class CRM_Core_Form_Date {
   /**
    * This function is to build the date range - relative or absolute
    *
-   * @param Object  $form   the form object that we are operating on
+   * @param CRM_Core_Form  $form   the form object that we are operating on
    * @param string $fieldName
    * @param Array $selector array of option values to add
    * @param integer $count
@@ -210,8 +212,9 @@ Class CRM_Core_Form_Date {
     $form->add('select',
       "{$fieldName}_relative",
       ts('Relative Date Range'),
-        $selector,
-        $required
+      $selector,
+      $required,
+      array('class' => 'crm-select2')
       );
 
       $form->addDateRange($fieldName, $from, $to, $fromLabel, $dateFormat, FALSE, $displayTime);