Campbell Ritchie wrote:The duration of a year is not 365.25 days. According to this webpage that is 11min 14 seconds too long. anyway, using floating-point arithmetic is bound to cause imprecisions.
It's much more complicated than that.
According to Wikipedia, a Julian year is 365.25 days. I guess that the definition on the above website is the length of a Gregorian year (a year according to the usual Gregorial calendar). But there are also other ways to define a year: for example a sidereal year, which is the time it takes the Earth to make exactly one orbit around the Sun, is slightly different (365 days, 6 hours 9 minutes, 9.7676 seconds). And there are other definitions which are again slightly different.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com