-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meeus #3040
Meeus #3040
Conversation
constexpr Date DateParser::Parse(char const* const str, | ||
std::size_t const size) { | ||
return ReadToEnd(str, size).ToDate(); | ||
constexpr Date DateParser::Parse(char const* str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
char const* const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is incremented.
std::size_t const size) { | ||
return ReadToEnd(str, size).ToDate(); | ||
constexpr Date DateParser::Parse(char const* str, | ||
std::size_t size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is decremented.
Split off from #3034.
Use Meeus’s algorithms instead of attempting to hand-roll our own date arithmetic.
Add support for the (proleptic) Julian calendar; dates before 1583 must have a prefix
J
orG
to indicate the calendar used.Add support for a leading sign on years, to represent years before 0000 (1 BC).
Add an
operator<<
; check that its output parses correctly for all dates from JD0.5 to the Gröbner release.