From ba794c7657906e0f753e2dc657c111518523e837 Mon Sep 17 00:00:00 2001 From: ccx1024cc <1261138729@qq.com> Date: Fri, 16 Dec 2016 14:14:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E6=9C=9F=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/time_formats.rb | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config/initializers/time_formats.rb diff --git a/config/initializers/time_formats.rb b/config/initializers/time_formats.rb new file mode 100644 index 0000000..86e762e --- /dev/null +++ b/config/initializers/time_formats.rb @@ -0,0 +1,3 @@ +Time::DATE_FORMATS[:default] = '%Y-%m-%d %H:%M:%S' +Time::DATE_FORMATS[:full] = '%Y-%m-%d %H:%M:%S' +Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") }