Switch to a more suitable date/time format.

This commit is contained in:
Paul van Tilburg 2011-11-01 15:27:16 +01:00
parent 7719124655
commit 268870689d
1 changed files with 10 additions and 0 deletions

View File

@ -10,6 +10,7 @@
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
require "active_support"
require "camping"
require "markaby"
require "pathname"
@ -17,6 +18,15 @@ require "pathname"
Markaby::Builder.set(:indent, 2)
Camping.goes :StopTime
unless defined? BASE_DIR
BASE_DIR = Pathname.new(__FILE__).dirname.expand_path + "public"
# Set the default date(/time) format.
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
:default => "%Y-%m-%d %H:%M")
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(
:default => "%Y-%m-%d")
end
module StopTime
def self.create