diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2010-06-01 09:59:10 +0200 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2010-06-01 09:59:10 +0200 |
commit | 966ce4209f6a5ed13cf898a01998fbef8fdb5db4 (patch) | |
tree | 04f39ff4af7ad2776c0c3cc072189ba09e4336e1 /timepollhead.rb | |
parent | 8473add34098228f67ae33cd90e905fc83e2c5e6 (diff) |
additional bugfix for locale problem
Diffstat (limited to '')
-rw-r--r-- | timepollhead.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/timepollhead.rb b/timepollhead.rb index 56a85db..dc4476c 100644 --- a/timepollhead.rb +++ b/timepollhead.rb @@ -253,7 +253,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{ @@ -298,7 +301,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>" |