<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,6 +10,14 @@ end
 
 
 class Time
+  
+  def localized_sanitized_month_names
+    :date_helper_month_names.l.reject {|e| not e.kind_of? String}
+  end
+  
+  def localized_sanitized_abbr_month_names
+    :date_helper_abbr_month_names.l.reject {|e| not e.kind_of? String}
+  end
   # Acts the same as #strftime, but returns a localized version of the
   # formatted date/time string.
   def localize(format='default')
@@ -20,9 +28,9 @@ class Time
       cc = c.sub(/^%[EO]?(.)$/o, '%\\1')
       case cc
       when '%A'; o &lt;&lt; :date_helper_day_names.l[wday]
-      when '%a'; o &lt;&lt; :date_helper_abbr_day_names.l[wday] 
-      when '%B'; o &lt;&lt; :date_helper_month_names.l[mon]
-      when '%b'; o &lt;&lt; :date_helper_abbr_month_names.l[mon]
+      when '%a'; o &lt;&lt; :date_helper_abbr_day_names.l[wday]
+      when '%B'; o &lt;&lt; localized_sanitized_month_names[mon-1]
+      when '%b'; o &lt;&lt; localized_sanitized_abbr_month_names[mon-1]
         #when '%c'; o &lt;&lt; :date_helper_time_formats.l[:default] ? :date_helper_date_formats.l[:default] : strftime('%Y-%m-%d')
       when '%p'; o &lt;&lt; if hour &lt; 12 then :date_helper_am.l else :date_helper_pm.l end
       else;      o &lt;&lt; c
@@ -44,8 +52,8 @@ class Date
       case cc
       when '%A'; o &lt;&lt; :date_helper_day_names.l[wday]
       when '%a'; o &lt;&lt; :date_helper_abbr_day_names.l[wday] 
-      when '%B'; o &lt;&lt; :date_helper_month_names.l[mon]
-      when '%b'; o &lt;&lt; :date_helper_abbr_month_names.l[mon]
+      when '%B'; o &lt;&lt; localized_sanitized_month_names[mon-1]
+      when '%b'; o &lt;&lt; localized_sanitized_abbr_month_names[mon-1]
         #when '%c'; o &lt;&lt; :date_helper_time_formats.l[:default] ? :date_helper_date_formats.l[:default] : strftime('%Y-%m-%d')
       when '%p'; o &lt;&lt; if hour &lt; 12 then :date_helper_am.l else :date_helper_pm.l end
       else;      o &lt;&lt; c</diff>
      <filename>lib/rails/localization.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>66e8b3f2d53fa66ccc43a7550df6c0906b5dcc9e</id>
    </parent>
    <parent>
      <id>535f251868431c96f5f63fd46f057186b83e1958</id>
    </parent>
  </parents>
  <author>
    <name>Matt Aimonetti</name>
    <email>mattaimonetti@gmail.com</email>
  </author>
  <url>http://github.com/mattetti/globalite/commit/f724aade6297a37a28869147823cb4454912aa6e</url>
  <id>f724aade6297a37a28869147823cb4454912aa6e</id>
  <committed-date>2009-02-12T23:07:22-08:00</committed-date>
  <authored-date>2009-02-12T23:07:22-08:00</authored-date>
  <message>Merge branch 'master' of git://github.com/ihunter/globalite

* 'master' of git://github.com/ihunter/globalite:
  just reject all the array elements which arent localizations
  removed comment put in wrong place
  fixing bug with date_helper[_abbr]_month_names index lookup

Conflicts:
	lib/rails/localization.rb</message>
  <tree>819dda818bbcb367102ea0e7488b0f21db13eb27</tree>
  <committer>
    <name>Matt Aimonetti</name>
    <email>mattaimonetti@gmail.com</email>
  </committer>
</commit>
