summaryrefslogtreecommitdiffstats
path: root/app/views/common
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-06-19 22:52:15 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-06-19 22:52:15 +0000
commit41ff1b9cb2648eab0c8d67b074de81efe1eabb78 (patch)
tree975ac1b7c3783021a44291b28bb7ca67ff780ff1 /app/views/common
parentb2e903ff7c7eb0de8576dcd8ebd90e8322ebf594 (diff)
downloadredmine-41ff1b9cb2648eab0c8d67b074de81efe1eabb78.tar.gz
redmine-41ff1b9cb2648eab0c8d67b074de81efe1eabb78.zip
Display the correct ISO week number on the project calendar.
http://en.wikipedia.org/wiki/ISO_week Contributed by Holger Just git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3790 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/common')
-rw-r--r--app/views/common/_calendar.rhtml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/common/_calendar.rhtml b/app/views/common/_calendar.rhtml
index d0cf2a07a..14d26badd 100644
--- a/app/views/common/_calendar.rhtml
+++ b/app/views/common/_calendar.rhtml
@@ -6,7 +6,7 @@
<tr>
<% day = calendar.startdt
while day <= calendar.enddt %>
-<%= "<td class='week-number' title='#{ l(:label_week) }'>#{day.cweek}</td>" if day.cwday == calendar.first_wday %>
+<%= "<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>" if day.cwday == calendar.first_wday %>
<td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
<p class="day-num"><%= day.day %></p>
<% calendar.events_on(day).each do |i| %>