Hi All, We all know that US and Britain switched to Gregorian calendar in 1752 and they dropped 11 days after Sep 2nd. But the Gregorian calendar provided by Sun/java uses 1582 as the change of year from Julian to Gragorian....dates before 1582 are Julian. My problem is that for creating an application to be used by British and Americans I want to display September 1752 with 11 missing days, the same way as is done by unix. Is there an easy way to do this?? Any suggestions are welcome. Thanks Pomchi
It looks like the GregorianCalendar class has a nifty method, public void setGregorianChange(Date date) which allows you to override the default date of October 15, 1582. You should be able to set it to whatever date you feel is most appropriate for your application ...
Wow! Now we're getting into esoteric JavaLand! I'm impressed...
Give a man a fish, he'll eat for one day. <br />Teach a man to fish, he'll drink all your beer.<br /> <br />Cheers,<br /> <br />Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Joined: Apr 03, 2001
Thanks for the reply! I tried that and compared the day of the week returned for Sep 2nd & 14th 1752 with the unix calendar. The day for 2nd Sep was correct but for 14th if returned the incorrect day. But may be this is the correct behaviour....I mean it returned me the day according to the Julian calendar. But what I want is, something that just simply removes the next 11 days after 2nd Sep 1752 and proceeds with the Gregorian calendar. You know what I mean?? Suggestions?? Thanks Pomchi