Notes posted by julescopeland
RSS feed
0 thanks

0 thanks
Take care with time ranges
Trying this in the console:
(1.day.from_now..5.days.from_now).overlaps?(5.days.from_now..10.days.from_now)
will blow up…
It’s fine with Dates though:
(1.day.from_now.to_date..5.days.from_now.to_date).overlaps?(5.days.from_now.to_date..10.days.from_now.to_date) # => true

5 thanks