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 XAA16365; Sun, 24 Oct 2004 23:13:22 +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 XAA15833 for ; Sun, 24 Oct 2004 23:13:20 +0200 (MET DST) Received: from annexia.force9.co.uk (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i9OLDKca018437 for ; Sun, 24 Oct 2004 23:13:20 +0200 Received: from rich by annexia.force9.co.uk with local (Exim 3.36 #1 (Debian)) id 1CLpft-0005s4-00; Sun, 24 Oct 2004 22:13:13 +0100 Date: Sun, 24 Oct 2004 22:13:13 +0100 To: William Lovas , caml-list@inria.fr Subject: Re: [Caml-list] ANNOUNCE: Library for handling Gregorian date calculations Message-ID: <20041024211313.GB22047@annexia.org> References: <20041024190732.GA20180@annexia.org> <20041024203159.GA28136@force.stwing.upenn.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nVMJ2NtxeReIH9PS" Content-Disposition: inline In-Reply-To: <20041024203159.GA28136@force.stwing.upenn.edu> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at nez-perce with ID 417C1AF0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 0400,:01 lovas:01 2004:99 ocamldoc:01 ocamldoc:01 cpan:01 calc:01 api:01 omitted:01 2004.:99 2004.:99 ltd:98 ocaml:01 X-Attachments: type="application/pgp-signature" name="signature.asc" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --nVMJ2NtxeReIH9PS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 24, 2004 at 04:31:59PM -0400, William Lovas wrote: > On Sun, Oct 24, 2004 at 08:07:32PM +0100, Richard Jones wrote: > > I'm pleased to announce GregorianDate, which is a pure Objective CAML > > library for handling calculations on the Gregorian calendar. >=20 > This looks cool, but i have a few suggestions. First, it needs some onli= ne > documentation (beyond the examples), preferrably in ocamldoc format. Yes, you're right, but I'm quite busy at the moment. There is ocamldoc documentation in the tarball itself, and for an online reference you should look at: http://search.cpan.org/dist/Date-Calc/Calc.pod#DESCRIPTION The API is pretty much identical, except that I have omitted Steffen's time functions which really don't belong in this library. > In > particular, the following examples weren't transparent to me (a date > non-specialist): >=20 > > # business_of_standard (2004, 10, 24);; > > - : (int * int) * int =3D ((2004, 43), 7) [Sunday (7) in week 43 of year 2004.] > > # nth_weekday_of_month (2004, 10) 7 4;; > > - : int * int * int =3D (2004, 10, 24) [Calculate the 4th Sunday (7) in October 2004.] > > I don't know what a "business" date is, and 10-24-2004 isn't a weekday. > Actually, i think i just understood "nth_weekday_of_month", but > documentation would certainly have been helpful. For reference, business weeks are defined in ISO 8601, and you can find a synopsis here: http://www.cl.cam.ac.uk/~mgk25/iso-time.html > > # day_of_week (2004, 10, 24);; > > - : int =3D 7 > > etc. >=20 > Also, you might consider enriching the interface with some types: i'd say > at least that day of the week ought to be a variant. This not only makes > thing safer, but also makes the intended behavior of functions like > "nth_weekday_of_month" more apparent. Rich. --=20 Richard Jones. http://www.annexia.org/ http://www.j-london.com/ >>> http://www.team-notepad.com/ - collaboration tools for teams <<< Merjis Ltd. http://www.merjis.com/ - improving website return on investment Write Apache modules in OCaml - http://www.merjis.com/developers/mod_caml --nVMJ2NtxeReIH9PS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFBfBrp4le1M6q9pzoRAlwnAJ9bwMNvCZ19etVlKg1DAlvZ+uPyoACgtvg2 YBqnJMHtbAgE7LgjXfeElqU= =cGB+ -----END PGP SIGNATURE----- --nVMJ2NtxeReIH9PS-- ------------------- 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