-
Notifications
You must be signed in to change notification settings - Fork 707
Description
Howard, I recently ran across the need to convert from Gregorian Calendar to Julian Date and back working with various orbital data and ephemerides from JPL1. I checked the std::chrono
library, but didn't find anything Julian Date related. This is really something that would make a good addition to the library, although it may not be the area that gets the most use. It's critical that it be something contained in a language library as the nuances are significant and that is what makes it something that shouldn't be reinvented by the user each time the conversion is needed, there is just far too much room for error.
The conversions are straight-forward, but the nuances are in providing an implementation that allows the user to choose which adoption of the Gregorian calendar to use when converting from Julian Date, e.g. the Catholic Church adoption in 1582 resulting in a 10-day reset for accumulated leap seconds, or say the adoption by Great Britain and the Colonies in 1752 resulting in an 11-day reset. The implementation providing a user-choice would be similar to what is done choosing the pseudo rando number generation engine, e.g. Mersenne twister, etc..
I don't know if you've considered it and decided against it or not, so I thought I'd suggest it as a feature. A few links that provide a good overview of the conversion are:
Not a giant high-priority issue, but something that would make a nice and much appreciated addition. (if you already have it in the library somewhere and I missed it, where is it squirreled-away?)
footnotes: