[hermes] PATCH: Show Sunday when entering/editing time.

Jason M. Felice jfelice at cronosys.com
Tue Jul 8 07:44:53 PDT 2003


The enter, edit, and submit screens were catching six days worth of time, not
seven.  This patch shows seven days (less one second so that the ending date
display is still correct).

-- 
 Jason M. Felice
 Cronosys, LLC <http://www.cronosys.com/>
 216.221.4600 x302
-------------- next part --------------
? config/html.php
? lib/api.php
Index: edit.php
===================================================================
RCS file: /repository/hermes/edit.php,v
retrieving revision 1.9
diff -u -r1.9 edit.php
--- edit.php	23 May 2003 14:44:28 -0000	1.9
+++ edit.php	8 Jul 2003 14:37:38 -0000
@@ -33,7 +33,7 @@
 
 $timestamp = Hermes::getCurrentTimestamp();
 $startofweek = Hermes::getStartOfWeekStamp($timestamp);
-$endofweek = $startofweek + (6 * 86400);
+$endofweek = $startofweek + (7 * 86400) - 1;
 
 $title = sprintf(_("Edit Time for %s to %s"), strftime('%x', $startofweek), strftime('%x', $endofweek));
 require HERMES_TEMPLATES . '/common-header.inc';
Index: submit.php
===================================================================
RCS file: /repository/hermes/submit.php,v
retrieving revision 1.7
diff -u -r1.7 submit.php
--- submit.php	23 May 2003 14:44:30 -0000	1.7
+++ submit.php	8 Jul 2003 14:37:38 -0000
@@ -39,7 +39,7 @@
 
 $timestamp = Hermes::getCurrentTimestamp();
 $startofweek = Hermes::getStartOfWeekStamp($timestamp);
-$endofweek = $startofweek + (6 * 86400);
+$endofweek = $startofweek + (7 * 86400) - 1;
 
 $title = sprintf(_("Submit Time for %s to %s"), strftime('%x', $startofweek), strftime('%x', $endofweek));
 require HERMES_TEMPLATES . '/common-header.inc';
Index: time.php
===================================================================
RCS file: /repository/hermes/time.php,v
retrieving revision 1.15
diff -u -r1.15 time.php
--- time.php	2 Jun 2003 18:47:49 -0000	1.15
+++ time.php	8 Jul 2003 14:37:38 -0000
@@ -34,7 +34,7 @@
 
 $timestamp = Hermes::getCurrentTimestamp();
 $startofweek = Hermes::getStartOfWeekStamp($timestamp);
-$endofweek = $startofweek + (6 * 86400);
+$endofweek = $startofweek + (7 * 86400) - 1;
 
 $title = sprintf(_("Time Entry for %s to %s"), strftime('%x', $startofweek), strftime('%x', $endofweek));
 require HERMES_TEMPLATES . '/common-header.inc';


More information about the hermes mailing list