Mercurial > hg > soundsoftware-site
comparison lib/redmine/helpers/calendar.rb @ 511:107d36338b70 live
Merge from branch "cannam"
author | Chris Cannam |
---|---|
date | Thu, 14 Jul 2011 10:43:07 +0100 |
parents | cbce1fd3b1b7 |
children | cbb26bc654de |
comparison
equal
deleted
inserted
replaced
451:a9f6345cb43d | 511:107d36338b70 |
---|---|
66 # 1 = Monday ... 7 = Sunday | 66 # 1 = Monday ... 7 = Sunday |
67 def first_wday | 67 def first_wday |
68 case Setting.start_of_week.to_i | 68 case Setting.start_of_week.to_i |
69 when 1 | 69 when 1 |
70 @first_dow ||= (1 - 1)%7 + 1 | 70 @first_dow ||= (1 - 1)%7 + 1 |
71 when 6 | |
72 @first_dow ||= (6 - 1)%7 + 1 | |
71 when 7 | 73 when 7 |
72 @first_dow ||= (7 - 1)%7 + 1 | 74 @first_dow ||= (7 - 1)%7 + 1 |
73 else | 75 else |
74 @first_dow ||= (l(:general_first_day_of_week).to_i - 1)%7 + 1 | 76 @first_dow ||= (l(:general_first_day_of_week).to_i - 1)%7 + 1 |
75 end | 77 end |