views:

147

answers:

3

How i can use the maya calendar in Java?

A: 

LOL, try setting the last selectable date to 21 December 2012 ? but is does not really end there, it just starts over so you want to start counting again after 21 December 2012?

FLY
+1  A: 

The best way of using other calendars/chronologies in Java is the excellent Joda-Time library. It doesn't have a Mayan chronology itself, but you could right your own implementation of the Mayan rules and plug it in. Shouldn't be too onerous.

GaryF
Not sure if it is so easy, even Jon Skeet punted: http://msmvps.com/blogs/jon_skeet/archive/2009/11/06/noda-time-is-born.aspx#1738663
Thilo
He's writing a straight port, and wants to focus on that rather than additional features such as new chronologies. I think that's fair enough, without indicating how hard it would be to write a new chronology.
GaryF
A: 

Use JodaTime. Oops, sorry, just a reflex when reading a question about java.util.Calendar ;-)

There are some Java applets on the web that might be helpful to you.

Robert Petermeier