diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-11-16 20:26:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-11-16 20:26:36 +0000 |
commit | e4ce95c3a18496e8bc20787331d8f11c6b6b6e25 (patch) | |
tree | bf0895012fc2058c0b583c69295af8da76534f46 /app/models/setting.rb | |
parent | 4951676172b2545f409c0ff677c873338bc80be5 (diff) | |
download | redmine-e4ce95c3a18496e8bc20787331d8f11c6b6b6e25.tar.gz redmine-e4ce95c3a18496e8bc20787331d8f11c6b6b6e25.zip |
Added a couple of new formats for the 'date format' setting.
Added a 'time format' setting.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@905 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/setting.rb')
-rw-r--r-- | app/models/setting.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/models/setting.rb b/app/models/setting.rb index 1c953f4c8..4d4cf0045 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -17,6 +17,23 @@ class Setting < ActiveRecord::Base + DATE_FORMATS = [ + '%Y-%m-%d', + '%d/%m/%Y', + '%d.%m.%Y', + '%d-%m-%Y', + '%m/%d/%Y', + '%d %b %Y', + '%d %B %Y', + '%b %d, %Y', + '%B %d, %Y' + ] + + TIME_FORMATS = [ + '%H:%M', + '%I:%M %p' + ] + cattr_accessor :available_settings @@available_settings = YAML::load(File.open("#{RAILS_ROOT}/config/settings.yml")) Redmine::Plugin.registered_plugins.each do |id, plugin| |