Browse thread
[Caml-list] date manipulation library
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Benjamin Geer <ben@s...> |
| Subject: | Re: [Caml-list] date manipulation library |
Mattias Waldau wrote: > The source for Java's implementation can be found at > > http://korea.gnu.org/gcc/src/gcc-3.1/libjava/java/util/Date.java I wouldn't recommend copying the Java interface verbatim. The java.util.Date class was designed (in JDK 1.0) without regard for localisation. In JDK 1.1, the java.util.Calendar class was added to fix this problem. The combination of Date and Calendar works well in Java; Date is fine for most purposes, and when you want calendar functionality, you use the more heavyweight Calendar object. But as you can see from the source code of Date, all its calendar functionality in java.util.Date is deprecated. If you wanted to write something like this from scratch, you probably wouldn't want to include any calendar functionality in Date at all. Ben ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners