-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: date like objects support #198
feat: date like objects support #198
Conversation
@mcmire, could you take a look? |
Hey @fizvlad! Thanks for the PR. I've looked over it and nothing stands out, but haven't had time to play with it yet. About the confusing diff — is there anything you feel like should happen differently there? |
I'm only concerned about diff making it feel like Current output:
|
7f1d816
to
4dc1800
Compare
Rebased the branch to resolve merge conflicts |
4dc1800
to
a0decaf
Compare
Specs with |
Hey, @mcmire ! Could you take another look? |
Hey @fizvlad! Sorry for the long delay on this. I think I can fix that diff issue you mentioned but the rest of this seemed fine! Thanks again for the PR. |
This feature has been included in v0.11.0. Thanks again! |
Closes #182
Tbh, I just went through appearances of
/(TimeLike|time_like)/
and created similar logic for date like objects :DI'm really hesitant about whether
DateTime
objects should be considereddate_like
(although ActiveSupport definesDateTime#acts_like_date?
). SinceDate
andDateTime
are never equal,expect(Date.new(2020, 1, 1)).to eq(DateTime.new(2020, 1, 1))
will result in a confusing diff (see the spec/support/shared_examples/active_support.rb)