Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calculating historical dates

 
Stuart Lord
Ranch Hand
Posts: 37
Chrome Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very briefly, are there any java classes which can calculate dates prior to 1 January 1970 and also 1752?

The latter year was that in which the Julian calendar changed over to the Gregorian one (in most of Europe) - the length of the year was more closely defined to be 365 days, 5 hours, 48 minutes and 46 seconds. Before it was given as 365 days and 6 hours.

Under the new definition the 'leap day' was lost on the centennial year (double leap year) unless that year was completely devisable by 400. If so then it kept its leap year status. This all meant that in October of 1752, 13 days were lost to account for the 13 double leap years that had elapsed since Christian calendars were first drawn up. This caused traders to riot in the streets of European cities, as they thought that they were losing precious days of work...!
[ June 30, 2008: Message edited by: Stuart Lord ]
 
Paul Clapham
Sheriff
Pie
Posts: 20763
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like java.util.GregorianCalendar does. Have a look at its API documentation, it looks like most of the points you addressed are covered.
 
Stuart Lord
Ranch Hand
Posts: 37
Chrome Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul - Thanks for your help, I'll be interested to find out what the API says vis-a-vis the GregorianCalendar class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic