Skip to content
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

Make julian dates roundtrip through to_time.to_date #8

Merged

Conversation

jeremyevans
Copy link
Contributor

Previously, julian dates would not round trip through to_time.to_date,
because Time is always considered gregorian. This converts the Date
instance from julian to gregorian before converting to Time, ensuring
that an equal date object will be returned if converting that Time
back to Date.

This does result in julian Date objects showing different day values
if converting to Time.

Fixes Ruby Bug 8428.

Previously, julian dates would not round trip through to_time.to_date,
because Time is always considered gregorian.  This converts the Date
instance from julian to gregorian before converting to Time, ensuring
that an equal date object will be returned if converting that Time
back to Date.

This does result in julian Date objects showing different day values
if converting to Time.

Fixes Ruby Bug 8428.
@jeremyevans jeremyevans merged commit d8df645 into ruby:master Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant