Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def two_dates_to_range(date_a, date_b)
- if date_a.month == date_b.month
- "#{Date::ABBR_MONTHNAMES[date_a.mon]} #{date_a.day}-#{date_b.day}"
- else
- "#{Date::ABBR_MONTHNAMES[date_a.mon]} #{date_a.day} - #{Date::ABBR_MONTHNAMES[date_b.mon]} #{date_b.day}"
- end
- end
Add Comment
Please, Sign In to add comment