]> wagnertech.de Git - timetracker.git/commitdiff
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 f159794a41f727b63491a52367a6b28c61cbdcc8..8456bbee3d4f2bb1e8c3a38671466e1d0f391b53 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 2b3d24510f9fae9a91600a72295be6fa5f03da5f..c35961a11fbb5cedb03cba62707b22a0a3f13a90 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 c07dd29e2ce71683ec273c176595d361c0cbf242..a74d98a06072beff8150546a581b8e887962e2c2 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 e91d9345618614492899b1155ba66313c1835044..c06ae761f513a7f22f29f3254df41a46e2902d28 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 1a17deec08c378b21e0c1617440cab45d654ae3f..74b68f8f1d0e9548d9ed707787aadf6ad33f2adc 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 fb3861a08f3dfbf21acb3ead35bf5f40b8ac1344..236ada192407bf51c3a3ac0ae4f6b81e3965895b 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 08ac64fef92500172c5b8c704b0e410592e0fb55..9062abf8e9ce095bf828b49dffaaddbd48386208 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'));