From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA13176; Tue, 16 Sep 2003 10:29:21 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA14025 for ; Tue, 16 Sep 2003 10:29:20 +0200 (MET DST) Received: from rabelais.socialtools.net (rabelais.socialtools.net [81.2.94.243]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8G8TJT01908 for ; Tue, 16 Sep 2003 10:29:20 +0200 (MET DST) Received: by rabelais.socialtools.net (Postfix, from userid 108) id 37D7F232DF; Tue, 16 Sep 2003 09:29:19 +0100 (BST) Received: from socialtools.net (chaucer.socialtools.net [81.2.94.242]) by rabelais.socialtools.net (Postfix) with ESMTP id 78CAB232DA; Tue, 16 Sep 2003 09:29:18 +0100 (BST) Message-ID: <3F66C9DE.30309@socialtools.net> Date: Tue, 16 Sep 2003 09:29:18 +0100 From: Benjamin Geer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-gb, en, fr, it MIME-Version: 1.0 To: Mattias Waldau Cc: caml-list@inria.fr Subject: Re: [Caml-list] date manipulation library References: <20030915143708.GK2354@alan-schm1p> <20030915183458.GA6577@fistandantilus.takhisis.org> <20030916072016.GB9403@fistandantilus.takhisis.org> <3F66BCAA.5050701@abc.se> In-Reply-To: <3F66BCAA.5050701@abc.se> X-Enigmail-Version: 0.76.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-1.0 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,RCVD_IN_ORBS, RCVD_IN_OSIRUSOFT_COM,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_MOZILLA_UA,X_ACCEPT_LANG version=2.54 X-Spam-Checker-Version: SpamAssassin 2.54 (1.174.2.17-2003-05-11-exp) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 mattias:01 waldau:01 java's:01 gcc:01 gcc-:01 util:01 util:01 korea:97 wrote:03 interface:03 library:03 object:03 gnu:05 deprecated:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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