Title: SF.net SVN: mrbs:[2452] mrbs/branches/flexible_day_end/web/functions.inc
Revision
2452
Author
cimorrison
Date
2012-10-02 15:29:25 +0000 (Tue, 02 Oct 2012)

Log Message

Tidied code

Modified Paths


Diff

Modified: mrbs/branches/flexible_day_end/web/functions.inc (2451 => 2452)


--- mrbs/branches/flexible_day_end/web/functions.inc	2012-10-02 15:24:53 UTC (rev 2451)
+++ mrbs/branches/flexible_day_end/web/functions.inc	2012-10-02 15:29:25 UTC (rev 2452)
@@ -1036,8 +1036,9 @@
 // seconds since the start of the day, $s
 function hour_min($s)
 {
-  $following_day = ($s >= (24*60*60));
-  $s = $s%(24*60*60);  // in case $s is on the next day
+  $seconds_per_day = 24*60*60;
+  $following_day = ($s >= $seconds_per_day);
+  $s = $s % $seconds_per_day;  // in case $s is on the next day
   // Choose a day that doesn't have any DST transitions in any timezone
   $t = mktime(0, 0, $s, 1, 1, 2000);
   $result = utf8_strftime(hour_min_format(), $t);
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to