diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2010-06-01 10:01:27 +0200 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2010-06-01 10:01:27 +0200 |
commit | e78e69a50201191d359cde0ad4616ce347e6f028 (patch) | |
tree | 72bf5c7e2707fe03844b0d9267e3d063878b22e9 /timepollhead.rb | |
parent | c263d46ec622b9ef88ea74fc717e7e9b72a4c660 (diff) | |
parent | 966ce4209f6a5ed13cf898a01998fbef8fdb5db4 (diff) |
merged
Diffstat (limited to 'timepollhead.rb')
-rw-r--r-- | timepollhead.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/timepollhead.rb b/timepollhead.rb index 45f826d..6f3fcec 100644 --- a/timepollhead.rb +++ b/timepollhead.rb @@ -120,7 +120,7 @@ class TimePollHead ret = "<tr><th colspan='2' class='invisible'></th>" head_count("%Y-%m",false).each{|title,count| year, month = title.split("-").collect{|e| e.to_i} - ret += "<th colspan='#{count}'>#{Date::DATE_TEXTS[Date_locale.get_language_key(Locale.current)][:abbr_monthnames][month]} #{year}</th>\n" + ret += "<th colspan='#{count}'>#{Date.parse("#{year}-#{month}-01").strftime("%b %Y")}</th>\n" } ret += "<th class='invisible'></th></tr><tr><th colspan='2' class='invisible'></th>" @@ -254,7 +254,10 @@ END ret += "</tr><tr>\n" - 7.times{|i| ret += "<th class='weekday'>#{Date::DATE_TEXTS[Date_locale.get_language_key(Locale.current)][:abbr_daynames][(i+1)%7]}</th>" } + 7.times{|i| + # 2010-03-01 was a Monday, so we can use this month for a dirty hack + ret += "<th class='weekday'>#{Date.parse("2010-03-0#{i+1}").strftime("%a")}</th>" + } ret += "</tr><tr>\n" ((@startdate.wday+7-1)%7).times{ @@ -299,7 +302,7 @@ END ret += "<th class='invisible'></th>" head_count("%Y-%m",true).each{|title,count| year,month = title.split("-").collect{|e| e.to_i} - ret += "<th colspan='#{count}'>#{Date::DATE_TEXTS[Date_locale.get_language_key(Locale.current)][:abbr_monthnames][month]} #{year}</th>\n" + ret += "<th colspan='#{count}'>#{Date.parse("#{year}-#{month}-01").strftime("%b %Y")}</th>\n" } ret += "</tr><tr><th>" + _("Time") + "</th>" |