aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time/conversions.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-11-25 23:56:28 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-11-25 23:56:28 +0000
commiteacca8d7e6227d730918b829f022f2fb8592358c (patch)
tree7cd0f210d4314b8b7e5ba838d0af6aa8c583ca34 /activesupport/lib/active_support/core_ext/time/conversions.rb
parent619e5c29f45ccbe626adff654b3a6b0d9fa4ad1f (diff)
downloadrails-eacca8d7e6227d730918b829f022f2fb8592358c.tar.gz
rails-eacca8d7e6227d730918b829f022f2fb8592358c.tar.bz2
rails-eacca8d7e6227d730918b829f022f2fb8592358c.zip
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
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time/conversions.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/time/conversions.rb1
1 files changed, 1 insertions, 0 deletions
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"