Martin Hasch schreef: > > Hello, > > On Sat, Mar 22, 2003 at 11:55:42AM +0100, Eugene van der Pijll wrote: > > To give a famous example: > > > > $r = DateTime->new( year => 1752, > > month => 9, > > day => 14 ); > > > > # George Washington's birthday > > $d = DateTime::Calendar::Christian->new( > > year => 1732, > > month => 2, > > day => 11, > > reform_date => $r ); > > > > $d->add( years => 60 ); > .........................^ read: 100 > > # George Washington's 100th birthday > > print $d->datetime; > > > > prints "1832-02-22" (which was indeed when it was celebrated). > > this behaviour I would consider a bug.
Yes, but your opinion doesn't count. Neither does mine. Let's ask king George II, whose opinion does count: "Be it therefore further declared, provided and enacted by the Authority aforesaid That nothing in this Act contained shall extend, or be construed to extend, to accelerate or anticipate the Days or Times for the opening, inclosing or shutting up any such Lands or Grounds as aforesaid, or the Days or Times on which any such temporary or distinct Property or Right in or to any such Lands or Grounds as aforesaid is to commence; but that all such Lands and Grounds as aforesaid shall from and after the said 2nd Day of September be, from Time to Time, respectively opened, inclosed, or shut up, and such temporary and distinct Property and Right in and to such Lands and Grounds as aforesaid, shall commence and begin upon the same natural Days and Times on which the same should have been so respectively opened, inclosed or shut up, or would have commenced or begun, in case this Act had not been made; that is to say, 11 Days later than the same would have happened, according to the said new Account and Supputation of Time, so to begin on the said 14th Day of September as aforesaid." (from paragraph V of the "Act for Regulating the Commencement of the Year; and for Correcting the Calendar now in Use", http://www.exit109.com/~ghealton/y2k/br1752a.html) So the end dates of land leases after 1752 are corrected for the 11 missing days. Later articles specify the same for the terms of payment of rents etc.; the starting or ending date of all other contracts, apprenticeships and other services; the payment of interest; and the determination of someone's 21st or other birthday. Similar language is also in the papal bull from 1582. furthermore, this was how it was actually done: the Washington's birthday _was_ celebrated on February 22nd. > Adding years > should leave the month and day intact if possible, or > do whatever is configured for exceptions (die, use the > nearest legal date, etc.). "1832-02-11" is perfectly > legal here. A DateTime::Calendar::Whatever object should > add DateTime::Calendar::Whatever years if you ask it to, not > DateTime years. Otherwise, what's the point in having a separate > object class anyway? What's the point of a special module which does '1732-02-11' + 100 years = '1832-02-11'? If you want that kind of mathematics, you can just use DateTime. > If one needed DateTime arithmetic they > should use DateTime objects/methods. If, on the other hand, > you want to know how a certain historical date given in one > time scale is represented in a different time scale, you should > explicitly convert from one type to the other. This isn't about one historical date in two time scales; this is about two historical dates in the same time scale. > > I prefer to call this calendar "Christian", not "catholic". It's also > > used in protestant countries like the US, the UK, and Northern Europe. > > > > Of course, nowadays it isn't bound to the Christian religion, so we > > would perhaps need a non-religious name. I suggest naming it for the > > starting date, which was the alleged birth date of Jesus Christ. Let's > > call it "Christian" after him. > > > > (Other suggestions are welcome, of course. (But not, please, > > DateTime::Calendar::CommonEra. Which is too modern and too flavourless > > IMO.) > > I'd prefer ::CommonEra for precisely that reason. This name, > however, would not reflect the variability of the transition > date. Also, the name Common Era is more difficult to understand, vague (is it the Christian calendar, or the Gregorian one?), non-descriptive (what does common mean? used by everyone? it isn't. most widely used? that wasn't always the Christian calendar. just widely used? so is the Mohammedan calendar.), untranslatable. > Then again, something like ::AdaptiveJulianGregorian > would create uncomfortably long module names. And I have never seen this name used before. ::JulianGregorian would be better than CE or AJG. Eugene
