From eacca8d7e6227d730918b829f022f2fb8592358c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 25 Nov 2006 23:56:28 +0000 Subject: Added Time#to_s(:time) which will just return H:M, like 17:44 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/time/conversions.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support/core_ext/time/conversions.rb') diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb index c141d082e2..6e8dae21f1 100644 --- a/activesupport/lib/active_support/core_ext/time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/time/conversions.rb @@ -8,6 +8,7 @@ module ActiveSupport #:nodoc: module Conversions DATE_FORMATS = { :db => "%Y-%m-%d %H:%M:%S", + :time => "%H:%M", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M", :rfc822 => "%a, %d %b %Y %H:%M:%S %z" -- cgit v1.2.3