On Wed, 12 Feb 2003, Peter J. Acklam wrote:

> If you want "44BC", you should be able to use exactly that!  :-)
>
> Alas, the current API is a bastard -- an odd mixture of the two
> and doesn't match *any* convention:  It doesn't match the "44 BC"-
> type notation since you have to use a leading "-" rather than the
> trailing "BC", which is not very intuitive; and it doesn't match
> the astronomical convention since it doesn't allow a year zero,
> although since the year is specified simply as an integer it looks
> like the astronomical convention is used.
>
> Go for the path of least surprise and allow both, by changing
>
>     # if user gives us year -10 that's really -9 to us, since we start
>     # at year 0 internally
>     $args{year}++ if $args{year} < 0;
>
> into
>
>     # convert "BC" year notation
>     $args{year} = 1 - $1 if $args{year} =~ /^\s*(\d+)\s*BC/;

Uh, speak for yourself, Mr. Christian.  Most of the people in the world do
not believe in Christ as the son of god, and so do not necessarily see
years in terms of "BC" and "AD".  In fact, I've specifically used "BCE"
and "AC" in the DateTime docs.  I suppose we could accept both, of course,
but I'm really not convinced that its terribly useful, especially since a
good chunk of the time the input to the year function will be a variable,
not a string typed in by the programmer.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to