Joined May 2011
·

niuage

ChallengePost
·
Manhattan, NY
·
·

Posted to Display date ranges in text in Rails over 1 year ago

You could probably make this a bit more readable and shorter if you called I18n.t("date_range.#{format}.#{date_format}", dates) at the end, once, and created a dates hash with the dates before hand.

Also, you use things like from_date.day after having already defined a variable from_day.

Achievements
30 Karma
0 Total ProTip Views