Years have 365 days, not 30*365
authorIan Lynagh <igloo@earth.li>
Fri, 10 Feb 2006 14:28:53 +0000 (14:28 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 10 Feb 2006 14:28:53 +0000 (14:28 +0000)
libraries/base/System/Time.hsc

index d7ae3f5..92055e4 100644 (file)
@@ -320,8 +320,8 @@ normalizeTimeDiff td =
                + 60 * (tdMin td 
                     + 60 * (tdHour td 
                          + 24 * (tdDay td 
-                              + 30 * (tdMonth td 
-                                   + 365 * tdYear td))))
+                              + 30 * tdMonth td 
+                              + 365 * tdYear td)))
 
       (diffYears,  rest1)    = rest0 `quotRem` (365 * 24 * 3600)
       (diffMonths, rest2)    = rest1 `quotRem` (30 * 24 * 3600)