[MLton] should Date.{fromString,scan} allow space instead of zero?

Stephen Weeks MLton@mlton.org
Mon, 6 Sep 2004 17:57:26 -0700


Does anyone have any thoughts on how we should handle the fact that
the Basis Library spec requires the day to contain two digits (the
first digit can not be a space) for the purposes of of
Date.{fromString,scan}?  To be concrete, the spec says that

  Fri Jul 05 14:25:16 1996

should be accepted but that

  Fri Jul  5 14:25:16 1996

should not.

The current release of MLton (20040227) accepts both, but I recently
changed it to follow the spec.  I am now having second thoughts -- as
suggested by Peter Sestoft on the basis library discussion list, many
programs generate dates with the space, so it seems better to be
permissive when parsing a date to accept the space.

If we deviate, I could add a comment to the basis library section of
the user guide.