-
Notifications
You must be signed in to change notification settings - Fork 92
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
suport rails 6 #52
base: master
Are you sure you want to change the base?
suport rails 6 #52
Conversation
time_difference.gemspec
Outdated
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem| | |||
gem.version = "0.7.0" | |||
gem.license = 'MIT' | |||
|
|||
gem.add_runtime_dependency('activesupport', '~> 5.1') | |||
gem.add_runtime_dependency('activesupport') |
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.
It's better to do something like 'activesupport', '>= 5.1', '< 7'
, because there is no warranty that this gem will work with 7th version, or 8th, and so on.
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.
updated
5ac5fd9
to
35617d8
Compare
Any news on this? Would be very helpful @tmlee :) |
I've switched to https://github.com/excpt/moments with some contributions (improvements) to it (already merged), so I can recommend it. It doesn't have |
Thank you, that could be indeed a good alternative for us :) |
Just a heads up, I did a quick comparison between irb(main):001:0> t1 = 14.days.ago
=> Thu, 04 Aug 2022 15:52:25 MDT -06:00
irb(main):002:0> t2 = Time.zone.now
=> Thu, 18 Aug 2022 15:52:31 MDT -06:00
irb(main):004:0> TimeDifference.between( t1, t2 ).in_minutes
=> 20160.09
irb(main):008:0> Moments.difference( t1, t2 ).in_minutes
=> 20160 Again, maybe there is a setting to preserve this kind of precision but I couldn't find it. Just be aware. I think I'll try a fork of this library as a quick fix for now. |
No description provided.