Possible bug in Netdate?

[email protected]
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <[email protected]>
This may be my mistake, but here is a snippet of code which generates an
exception:

let x = Netdate.parse "5/10/2003"
;;

print_string (Netdate.format "%A, %B %d, %Y" x)

Fatal error: exception Invalid_argument("Parse.format_date")

Now, with some dates, for example (Netdate.create (Unix.time ())) the format
does not throw an error, so I assume it has to do with the partial specification
of the date.  Also, if i try (Netdate.format "%m/%d/%y" x) it does not have a
problem.  If I take 'x' and fill in the week_day then it no longer has an error,
but has inconstistent data, so I suspect the error is that week_day is not
calculated properly/at all in the Netdate.parse or the Netdate.format

If this is how netdate is supposed to work, then I shall have to wrap my calls
to parse with some Unix.mktime calls to fill in the empty date fields (if that 
is what the problem is) to normalize the data, which doesn't seem right.

I'm not subscribed, so be sure to CC me if you respond.

-Kenn


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.