[MLton-commit] r5732

Matthew Fluet fluet at mlton.org
Fri Jul 6 15:44:16 PDT 2007


Fixed a bug in Date structure; some functions would erroneously raise
Date when given a year <= 1900.  Thanks to Joe Hurd for the bug
report.


----------------------------------------------------------------------

U   mlton/trunk/basis-library/system/date.sml
U   mlton/trunk/doc/changelog

----------------------------------------------------------------------

Modified: mlton/trunk/basis-library/system/date.sml
===================================================================
--- mlton/trunk/basis-library/system/date.sml	2007-07-06 22:19:35 UTC (rev 5731)
+++ mlton/trunk/basis-library/system/date.sml	2007-07-06 22:44:15 UTC (rev 5732)
@@ -160,8 +160,7 @@
     (* Check whether date may be passed to ISO/ANSI C functions: *)
 
     fun okDate (T {year, month, day, hour, minute, second, ...}) =
-        1900 <= year 
-        andalso 1 <= day    andalso day    <= monthdays year month
+        1 <= day    andalso day    <= monthdays year month
         andalso 0 <= hour   andalso hour   <= 23
         andalso 0 <= minute andalso minute <= 59
         andalso 0 <= second andalso second <= 61 (* leap seconds *)

Modified: mlton/trunk/doc/changelog
===================================================================
--- mlton/trunk/doc/changelog	2007-07-06 22:19:35 UTC (rev 5731)
+++ mlton/trunk/doc/changelog	2007-07-06 22:44:15 UTC (rev 5732)
@@ -1,6 +1,9 @@
 Here are the changes since version 20051202.
 
 * 2007-07-6
+   - Fixed bug in Date module of Basis Library; some functions would
+     erroneously raise Date when given a year <= 1900.  Thanks to Joe
+     Hurd for the bug report.
    - Fixed a long-standing bug in monomorphisation pass.  Thanks to
      Vesa Karvonen for the bug report.
 




More information about the MLton-commit mailing list