Added a setting to configure the day that week start on (Monday or Sunday). (#4363)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3166 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -65,7 +65,14 @@ module Redmine
|
||||
# Return the first day of week
|
||||
# 1 = Monday ... 7 = Sunday
|
||||
def first_wday
|
||||
@first_dow ||= (l(:general_first_day_of_week).to_i - 1)%7 + 1
|
||||
case Setting.start_of_week.to_i
|
||||
when 1
|
||||
@first_dow ||= (1 - 1)%7 + 1
|
||||
when 7
|
||||
@first_dow ||= (7 - 1)%7 + 1
|
||||
else
|
||||
@first_dow ||= (l(:general_first_day_of_week).to_i - 1)%7 + 1
|
||||
end
|
||||
end
|
||||
|
||||
def last_wday
|
||||
|
||||
Reference in New Issue
Block a user