Datetime functions for Rails.