-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
Hi there,
I'm not sure this is the right place to put such issue, but I found an issue after updating from 3.0.1 to 3.3.3.
I tracked the change in behaviour to start appearing between versions 3.2.2 and 3.3.0, here's and example of the change:
with version 3.2.2
require "time"
require "date"
Time.parse("1000-01-01T00:00:00Z")
# date v3.2.2 => "1000-01-01T00:00:00.000Z"
Time.parse("1000-01-01T00:00:00Z").to_date
# date v3.2.2 => Wed, 27 Dec 0999
Date.parse("1000-01-01") == Time.parse("1000-01-01T00:00:00Z")
# date v3.2.2 => true
Time.parse("1000-01-01T00:00:00Z") == Date.parse("1000-01-01")
# date v3.2.2 => truewith version 3.3.0
require "time"
require "date"
Time.parse("1000-01-01T00:00:00Z")
# date v3.3.3 => "1000-01-01T00:00:00.000Z"
Time.parse("1000-01-01T00:00:00Z").to_date
# date v3.3.0 => Wed, 27 Dec 0999
Date.parse("1000-01-01") == Time.parse("1000-01-01T00:00:00Z")
# date v3.3.3 => false
Time.parse("1000-01-01T00:00:00Z") == Date.parse("1000-01-01")
# date v3.3.3 => falseAs you can see I'm working with date in the Julian calendar and comparing them used to work before 3.3.0.
Now I'm not sure if and what is the bug there, as this was maybe already an issue:
Time.parse("1000-01-01T00:00:00Z").to_date
# => Wed, 27 Dec 0999But in the end, this change of behaviour surfaced and I wanted to be sure it's reported.
Metadata
Metadata
Assignees
Labels
No labels