RubyOnRails J'adore rubyonrails pour ses méthodes pour le traitement et le calcul des dates.

Quelques unes de ces méthodes (à utiliser sans modération dans les named_scopes)

t = Time.now

t.mday
t.min
t.ago
t.as_json
t.mon
t.asctime
t.monday
t.at_beginning_of_day
t.month
t.at_beginning_of_month
t.months_ago
t.at_beginning_of_quarter
t.months_since
t.at_beginning_of_week
t.at_beginning_of_year
t.next_month
t.at_end_of_month
t.next_week
t.at_end_of_quarter
t.next_year
t.at_end_of_week
t.at_end_of_year
t.at_midnight
t.past?

Plus d'excuses pour ne pas arriver à faire de calculs sur les dates.... avec rubyonrails