I have 2 date ranges, start_date1..end_date1 and start_date2..end_date2, is there an easy “ruby” way to find all the dates that are in both ranges?
I have 2 date ranges, start_date1..end_date1 and start_date2..end_date2 , is there an easy ruby
Share
You can use
here’s a fully worked example:
if you’re counting characters, you can also just do
but I think the original version is clearer.