Date arithmetic in Ruby is possible because Ruby’s time objects are stored internally as numbers. Additions to dates and differences between dates are handled by adding to and subtracting the underlying numbers. Rails offers nice ‘ago’ and ‘from_now’ functions in ActiveSupport that allow computing lengths of time in a more human-readable way:
Date.today [...]
Read Full Post »
There are a couple of functions which you have to look up in any
language again and again, because they are slighty different in
each language, especially those for formatting of dates and
floating point numbers.
To display dates and datetimes in different formats in Ruby on
Rails applications, the following list for default formats
may help. The default date formats [...]
Read Full Post »