<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/models/page_event_tags_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -95,13 +95,13 @@ module PageEventTags
     
     *Usage:*
     &lt;pre&gt;&lt;code&gt;&lt;r:events:next&gt;...&lt;/r:events:next&gt;&lt;/code&gt;&lt;/pre&gt;
-  }	
-	tag &quot;events:next&quot; do |tag|
-		if next_event = Page.next_event
+  } 
+  tag &quot;events:next&quot; do |tag|
+    if next_event = Page.next_event
       tag.locals.page = next_event
       tag.expand
     end
-	end	
+  end 
 
   desc %{
     Gives access to next three upcoming events' pages.
@@ -109,9 +109,9 @@ module PageEventTags
     *Usage:*
     &lt;pre&gt;&lt;code&gt;&lt;r:events:upcoming&gt;...&lt;/r:events:upcoming&gt;&lt;/code&gt;&lt;/pre&gt;
   }
-	tag &quot;events:upcoming&quot; do |tag|
+  tag &quot;events:upcoming&quot; do |tag|
     tag.expand
-	end
+  end
 
   desc %{
     Cycles through each of the upcoming events. Inside this tag all page attribute tags
@@ -123,22 +123,56 @@ module PageEventTags
     &lt;/r:events:upcoming:each&gt;
     &lt;/code&gt;&lt;/pre&gt;
   }
-	tag &quot;events:upcoming:each&quot; do |tag|
-	  limit = tag.attr['limit'] || 3
+  tag &quot;events:upcoming:each&quot; do |tag|
+    limit = tag.attr['limit'] || 3
     events = Page.upcoming_events(limit)
-		result = []
+    result = []
     events.each do |event|
       tag.locals.event = event
       tag.locals.page = event
       result &lt;&lt; tag.expand
     end
     result
-	end
-	
-  tag 'events:upcoming:each:event' do |tag|
-    tag.locals.page = tag.locals.event
+  end
+
+  # ===================================
+
+  tag &quot;events:in_range&quot; do |tag|
     tag.expand
-  end	
+  end
+
+  desc %{
+    Cycles through events during the specified range. Inside this tag all 
+    page attribute tags are mapped to the current event's page.
+    
+    A @start@ date may be specified as just a year (e.g. @start=&quot;2009&quot;), 
+    which will return all events occurring during the given year. Or you
+    may specify a month (e.g. @start=&quot;2009/08&quot;), or day (e.g. @start=2009/06/14) 
+    which will return all events occurring during that month or day, respectively.
+    
+    You may also specify a date range, by providing @start@ and @finish@ attributes.
+    If you supply both of these, you should spell out the full date for both of them.
+    The dates supplied are *inclusive*, so if you supply @start=&quot;2009/03/01&quot; 
+    @finish=&quot;2009/03/02&quot;, it will include events occurring on March 1st and March 2nd.
+    
+    *Usage:*
+    &lt;pre&gt;&lt;code&gt;&lt;r:events:in_range:each start=&quot;yyyy/mm/dd&quot; [finish=&quot;yyy/mm/dd&quot;]&gt;
+     ...
+    &lt;/r:events:in_range:each&gt;
+    &lt;/code&gt;&lt;/pre&gt;
+  }
+  tag &quot;events:in_range:each&quot; do |tag|
+    start = tag.attr['start']
+    finish = tag.attr['finish']
+    events = Page.events_in_range(start, finish)
+    result = []
+    events.each do |event|
+      tag.locals.event = event
+      tag.locals.page = event
+      result &lt;&lt; tag.expand
+    end
+    result
+  end
 	
   desc %{
     Displays a monthly calendar with any published events displayed on the date the event occurs</diff>
      <filename>lib/page_event_tags.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>34608a38a65d5bb8a29ec46ea1324d80a55f468c</id>
    </parent>
  </parents>
  <author>
    <name>Andrew Neil</name>
    <email>andrew.jr.neil@gmail.com</email>
  </author>
  <url>http://github.com/mghaught/radiant-page-event/commit/e6cda6d5bbc0a8465e50b0e85aa047e71503cb3d</url>
  <id>e6cda6d5bbc0a8465e50b0e85aa047e71503cb3d</id>
  <committed-date>2009-06-08T09:45:06-07:00</committed-date>
  <authored-date>2009-06-08T09:45:06-07:00</authored-date>
  <message>Added tags r:events:in_range:each with specs.</message>
  <tree>830ea1a9b3b087900d66b1054d74220a1f65fc5e</tree>
  <committer>
    <name>Andrew Neil</name>
    <email>andrew.jr.neil@gmail.com</email>
  </committer>
</commit>
