<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,14 +11,15 @@ Authors
 Jeremy Voorhis -- http://jvoorhis.com
 Original implementation
 
-Jarkko Laine -- http://jlaine.net/
-Dynamic enhancements for starting week on Monday and highlighting weekends
-
 Geoffrey Grosenbach -- http://nubyonrails.com
 Test suite and conversion to a Rails plugin
 
-Tom Armitage -- http://infovore.org
-Improvements to markup (abbreviations on day-headings, &lt;caption&gt;); introduction of :accessible option.
+Contributors
+============
+
+* Jarkko Laine http://jlaine.net/
+* Tom Armitage http://infovore.org
+* Bryan Larsen http://larsen.st
 
 Usage
 =====</diff>
      <filename>README.txt</filename>
    </modified>
    <modified>
      <diff>@@ -18,6 +18,10 @@
   text-align: center;
 }
 
+thead tr {
+  color: black;
+}
+
 .monthName th {
   font-weight: normal;
   text-align: right;</diff>
      <filename>generators/calendar_styles/templates/grey/style.css</filename>
    </modified>
    <modified>
      <diff>@@ -34,6 +34,8 @@ module CalendarHelper
   #
   #   :show_today        =&gt; false             # Highlights today on the calendar using the CSS class 'today'. 
   #                                           # Defaults to true.
+  #   :previous_month_text   =&gt; nil           # Displayed left of the month name if set
+  #   :next_month_text   =&gt; nil               # Displayed right of the month name if set
   #
   # For more customization, you can pass a code block to this method, that will get one argument, a Date object,
   # and return a values for the individual table cells. The block can return an array, [cell_text, cell_attrs],
@@ -77,7 +79,9 @@ module CalendarHelper
       :abbrev =&gt; (0..2),
       :first_day_of_week =&gt; 0,
       :accessible =&gt; false,
-      :show_today =&gt; true
+      :show_today =&gt; true,
+      :previous_month_text =&gt; nil,
+      :next_month_text =&gt; nil
     }
     options = defaults.merge options
 
@@ -92,8 +96,18 @@ module CalendarHelper
       day_names.push(day_names.shift)
     end
 
-    cal = %(&lt;table class=&quot;#{options[:table_class]}&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;) 
-    cal &lt;&lt; %(&lt;caption class=&quot;#{options[:month_name_class]}&quot;&gt;&lt;/caption&gt;&lt;thead&gt;&lt;tr&gt;&lt;th colspan=&quot;7&quot;&gt;#{Date::MONTHNAMES[options[:month]]}&lt;/th&gt;&lt;/tr&gt;&lt;tr class=&quot;#{options[:day_name_class]}&quot;&gt;)
+    # TODO Use some kind of builder instead of straight HTML
+    cal = %(&lt;table class=&quot;#{options[:table_class]}&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;)
+    cal &lt;&lt; %(&lt;thead&gt;&lt;tr&gt;)
+    if options[:previous_month_text] or options[:next_month_text]
+      cal &lt;&lt; %(&lt;th colspan=&quot;2&quot;&gt;#{options[:previous_month_text]}&lt;/th&gt;)
+      colspan=3
+    else
+      colspan=7
+    end
+    cal &lt;&lt; %(&lt;th colspan=&quot;#{colspan}&quot; class=&quot;#{options[:month_name_class]}&quot;&gt;#{Date::MONTHNAMES[options[:month]]}&lt;/th&gt;)
+    cal &lt;&lt; %(&lt;th colspan=&quot;2&quot;&gt;#{options[:next_month_text]}&lt;/th&gt;) if options[:next_month_text]
+    cal &lt;&lt; %(&lt;/tr&gt;&lt;tr class=&quot;#{options[:day_name_class]}&quot;&gt;)
     day_names.each do |d|
       unless d[options[:abbrev]].eql? d
         cal &lt;&lt; &quot;&lt;th scope='col'&gt;&lt;abbr title='#{d}'&gt;#{d[options[:abbrev]]}&lt;/abbr&gt;&lt;/th&gt;&quot;</diff>
      <filename>lib/calendar_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,11 +14,13 @@ class CalendarHelperTest &lt; Test::Unit::TestCase
   # include Inflector
   # include ActionController::Assertions::SelectorAssertions
   include CalendarHelper
-  
+
 
   def test_with_output
-    output = &quot;&lt;h2&gt;Past Month&lt;/h2&gt;&quot; + calendar_with_defaults
-    output &lt;&lt; &quot;&lt;h2&gt;Current Month&lt;/h2&gt;&quot; + calendar_for_this_month
+    output = []
+    %w(calendar_with_defaults calendar_for_this_month calendar_with_next_and_previous).each do |methodname|
+      output &lt;&lt; &quot;&lt;h2&gt;#{methodname}&lt;/h2&gt;\n&quot; +  send(methodname.to_sym) + &quot;\n\n&quot;
+    end
     write_sample &quot;sample.html&quot;, output
   end
 
@@ -118,6 +120,13 @@ class CalendarHelperTest &lt; Test::Unit::TestCase
     calendar options
   end
 
+  def calendar_with_next_and_previous
+    calendar_for_this_month({
+      :previous_month_text =&gt; &quot;PREVIOUS&quot;,
+      :next_month_text =&gt; &quot;NEXT&quot;
+    })
+  end
+
   def write_sample(filename, content)
     FileUtils.mkdir_p &quot;test/output&quot;
     File.open(&quot;test/output/#{filename}&quot;, 'w') do |f|</diff>
      <filename>test/test_calendar_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a3293b8bdf7ec487d66f6b05f55156b42432e1fe</id>
    </parent>
  </parents>
  <author>
    <name>topfunky</name>
    <email>topfunky@798a5b91-ee08-0410-b43b-a734d69ea54e</email>
  </author>
  <url>http://github.com/adzap/calendar_helper/commit/95d48a253a77f30b203c7416358a027d820b1c01</url>
  <id>95d48a253a77f30b203c7416358a027d820b1c01</id>
  <committed-date>2008-01-04T09:36:42-08:00</committed-date>
  <authored-date>2008-01-04T09:36:42-08:00</authored-date>
  <message>Previous and next text option


git-svn-id: http://topfunky.net/svn/plugins/calendar_helper@261 798a5b91-ee08-0410-b43b-a734d69ea54e</message>
  <tree>07006e0fee468b531d5e7d6f0f332b5d21950fac</tree>
  <committer>
    <name>topfunky</name>
    <email>topfunky@798a5b91-ee08-0410-b43b-a734d69ea54e</email>
  </committer>
</commit>
