Added this day and last day to report interval options.
authoranuko <support@anuko.com>
Sat, 30 Sep 2017 21:36:31 +0000 (21:36 +0000)
committeranuko <support@anuko.com>
Sat, 30 Sep 2017 21:36:31 +0000 (21:36 +0000)
WEB-INF/lib/Period.class.php
WEB-INF/resources/ca.lang.php
WEB-INF/resources/da.lang.php
WEB-INF/resources/en.lang.php
WEB-INF/resources/ru.lang.php
WEB-INF/templates/footer.tpl
reports.php

index f159794..8456bbe 100644 (file)
@@ -33,6 +33,7 @@ define('INTERVAL_THIS_YEAR', 4);
 define('INTERVAL_ALL_TIME', 5);
 define('INTERVAL_LAST_WEEK', 6);
 define('INTERVAL_LAST_MONTH', 7);
+define('INTERVAL_LAST_DAY', 8);
 
 class Period {
   var $startDate;
@@ -63,9 +64,15 @@ class Period {
 
                switch ($period_type) {
                        case INTERVAL_THIS_DAY:
-                               $date_begin->setTimestamp($date_point->getTimestamp());
-                               $date_end->setTimestamp($date_point->getTimestamp());
-                       break;
+                            $date_begin->setTimestamp($date_point->getTimestamp());
+                            $date_end->setTimestamp($date_point->getTimestamp());
+                        break;
+
+                        case INTERVAL_LAST_DAY:
+                            $date_begin->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-1,$t_arr[5]));
+                            $date_end->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-1,$t_arr[5]));
+                        break;
+
                        case INTERVAL_THIS_WEEK:
                          $date_begin->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+$startWeekBias,$t_arr[5]));
                                $date_end->setTimestamp(mktime(0,0,0,$t_arr[4]+1,$t_arr[3]-$t_arr[6]+6+$startWeekBias,$t_arr[5]));
index 2b3d245..c35961a 100644 (file)
@@ -293,6 +293,7 @@ $i18n_key_words = array(
 // 'dropdown.no' => '--- no ---',
 // NOTE TO TRANSLATORS: dropdown.this_day does not necessarily means "today". It means a specific ("this") day selected on calendar. See Charts.
 // 'dropdown.this_day' => 'this day',
+// 'dropdown.last_day' => 'last day',
 // 'dropdown.this_week' => 'this week',
 // 'dropdown.last_week' => 'last week',
 // 'dropdown.this_month' => 'this month',
index c07dd29..a74d98a 100644 (file)
@@ -272,6 +272,8 @@ $i18n_key_words = array(
 'dropdown.no' => '--- Ingen ---',
 // NOTE TO TRANSLATORS: dropdown.this_day does not necessarily means "today". It means a specific ("this") day selected on calendar. See Charts.
 'dropdown.this_day' => 'Denne dag',
+// TODO: translate the following.
+// 'dropdown.last_day' => 'last day',
 'dropdown.this_week' => 'Denne uge',
 'dropdown.last_week' => 'Sidste uge',
 'dropdown.this_month' => 'Denne måned',
index e91d934..c06ae76 100644 (file)
@@ -273,6 +273,7 @@ $i18n_key_words = array(
 'dropdown.no' => '--- no ---',
 // NOTE TO TRANSLATORS: dropdown.this_day does not necessarily means "today". It means a specific ("this") day selected on calendar. See Charts.
 'dropdown.this_day' => 'this day',
+'dropdown.last_day' => 'last day',
 'dropdown.this_week' => 'this week',
 'dropdown.last_week' => 'last week',
 'dropdown.this_month' => 'this month',
index 1a17dee..74b68f8 100644 (file)
@@ -270,6 +270,7 @@ $i18n_key_words = array(
 'dropdown.all' => '--- все ---',
 'dropdown.no' => '--- нет ---',
 'dropdown.this_day' => 'этот день',
+'dropdown.last_day' => 'прошлый день',
 'dropdown.this_week' => 'эта неделя',
 'dropdown.last_week' => 'прошлая неделя',
 'dropdown.this_month' => 'этот месяц',
index fb3861a..236ada1 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.12.1.3668 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.12.2.3669 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 08ac64f..9062abf 100644 (file)
@@ -164,7 +164,9 @@ $form->addInput(array('type'=>'combobox',
   'data'=>array(INTERVAL_THIS_MONTH=>$i18n->getKey('dropdown.this_month'),
     INTERVAL_LAST_MONTH=>$i18n->getKey('dropdown.last_month'),
     INTERVAL_THIS_WEEK=>$i18n->getKey('dropdown.this_week'),
-    INTERVAL_LAST_WEEK=>$i18n->getKey('dropdown.last_week')),
+    INTERVAL_LAST_WEEK=>$i18n->getKey('dropdown.last_week'),
+    INTERVAL_THIS_DAY=>$i18n->getKey('dropdown.this_day'),
+    INTERVAL_LAST_DAY=>$i18n->getKey('dropdown.last_day')),
   'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
 // Add controls for start and end dates.
 $form->addInput(array('type'=>'datefield','maxlength'=>'20','name'=>'start_date'));