> This would also solve the following problem:
>
>     $d = DateTime->new( year => 2003, month  => 4, day    => 3,
>                         hour => 0,    minute => 0, second => 0 );
>     $md = DateTime::Calendar::Mayan->from_object( object => $d );
>
>     print $md->date, "\n";  # prints 12,19,10,2,10
>
>     $d = DateTime->new( year => 2003, month  => 4, day => 3,
>                         hour => 0,    minute => 0, second => 0,
>                         time_zone => 'Europe/Amsterdam' );
>     $md = DateTime::Calendar::Mayan->from_object( object => $d );
>
>     print $md->date, "\n";  # prints 12,19,10,2,9

I think thats correct behavior isn't it?  The value for RD utc passed will be 
different because the top example is a floating time.

> Some other things I noticed:
>
> Baktun's are numbered 13, 1, 2, 3, ..., 12 (and repeat). Yours are
> numbered -inf, ..., -2, -1, 0, 1, 2, ..., +inf, so the module will only
> give the correct long count from about 2700BC to about 2400AD. You may
> want to add a 'cycle' count (1 cycle = 13 baktuns). Also, the default
> value for baktun should perhaps be 13.

The easiest thing to do would be to catch that stuff in the constructor.  However I 
had assumed that a baktun could be 0-20 as 1 pictun = 20 baktun.  Do you have source 
of documentation you could point me at?

> You use a comma as default separator for the long count. On the web,
> I've only found periods.

That was a goof, it'll be fixed.

Cheers,

-J

--

Reply via email to