From 0eec884428b013f3ae26ce793841a9ca7c5635ad Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Wed, 16 Dec 2009 17:54:29 -0500 Subject: [PATCH] More options for date format Fixes #966 --- app/helpers/application_helper.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 02786600..bb43082f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -170,9 +170,13 @@ module ApplicationHelper standard_format = current_user.prefs.date_format translations = [ ['%m', 'mm'], + ['%b', 'M'], + ['%B', 'MM'], ['%d', 'dd'], - ['%Y', 'yy'], - ['%y', 'y'] + ['%a', 'D'], + ['%A', 'DD'], + ['%y', 'y'], + ['%Y', 'yy'] ] translations.inject(standard_format) do |str, translation| str.gsub(*translation)