<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -0,0 +1,2 @@
+== 0.2a / 2009-06-07
+Added start_hour and end_hour options</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -21,6 +21,12 @@ To create the time select:
 
 Don't forget to include the time_separator option.  Otherwise you will get an extra colon outside of the select field.
 
+Simple time select also takes a start_hour and end_hour option to be specified in military format (between 0-23).
+
+&lt;%= time_select &quot;event&quot;, &quot;time&quot;, { :default =&gt; Time.now.change(:hour =&gt; 21), :simple_time_select =&gt; true, :minute_interval =&gt; 20, :time_separator =&gt; &quot;&quot;, :start_hour =&gt; 10, :end_hour =&gt; 14 } %&gt;
+
+The start hour behaves as you would expect but the end_hour may not.  If you specify the end_hour as 10, your time select will include 10:15, 10:30, 10:45.  So the end_hour sets the last hour that the time select will include. Email me if you don't like this.
+
 When the time is submitted, you will have the value in params on the controller side as shown below:
   
   params[:event][:&quot;time(i)&quot;]</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -3,5 +3,5 @@ summary: Alternative to time_select provided by Rails.
 homepage: http://www.tonyamoyal.com
 plugin: http://github.com/tamoyal/simple_time_select/tree/master
 license: MIT
-version: 0.1a
+version: 0.2a
 rails_version: 2.3.0+</diff>
      <filename>about.yml</filename>
    </modified>
    <modified>
      <diff>@@ -7,26 +7,34 @@ module ActionView::Helpers
         # be set by some other control, and the date represented here will be overriden
         
         val_minutes = @datetime.kind_of?(Time) ? @datetime.min + @datetime.hour*60 : @datetime
-
+        
+        @options[:time_separator] = &quot;&quot;
+        
+        # Default is 15 minute intervals
+        minute_interval = 15
         if @options[:minute_interval] 
           minute_interval = @options[:minute_interval] 
-        else
-          # Default is 15 minute intervals
-          minute_interval = 15
         end
-        
-        # start_hour should be specified in military
+
+        start_minute = 0
+        # @options[:start_hour] should be specified in military
         # i.e. 0-23
-        start_hour = 0
         if @options[:start_hour]
-          start_hour = @options[:start_hour] * 60
+          start_minute = @options[:start_hour] * 60
         end
-
+        
+        end_minute = 1439
+        # @options[:end_hour] should be specified in military
+        # i.e. 0-23
+        if @options[:end_hour]
+          end_minute = ( @options[:end_hour] + 1 ) * 60 - 1  
+        end
+        
         if @options[:use_hidden] || @options[:discard_minute]
           build_hidden(:minute, val)
         else
           minute_options = []
-          start_hour.upto(1439) do |minute|
+          start_minute.upto(end_minute) do |minute|
             if minute%minute_interval == 0
               ampm = minute &lt; 720 ? ' AM' : ' PM'
               hour = minute/60</diff>
      <filename>lib/simple_time_select.rb</filename>
    </modified>
    <modified>
      <diff>@@ -74,7 +74,10 @@ class SimpleTimeSelectTest &lt; Test::Unit::TestCase
   end
   
   # TODO
-  def test_start_time
-    output = select_minute time, :simple_time_select =&gt; true, :start_hour =&gt; 4
+  def test_start_and_end_hour
+    time = Time.now.change(:hour =&gt; 21)
+    # 10 AM to 2 PM
+    output = select_minute time, :simple_time_select =&gt; true, :start_hour =&gt; 10, :end_hour =&gt; 14
+    puts &quot;#{output.inspect}&quot;
   end
 end</diff>
      <filename>test/simple_time_select_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f8527d8d639877dae7448e1f15396676203d0bad</id>
    </parent>
  </parents>
  <author>
    <name>Anthony Amoyal</name>
    <email>TAmoyal@new-host-2.home</email>
  </author>
  <url>http://github.com/tamoyal/simple_time_select/commit/d61fc082650d4f758fabdaa345a3f698a1791cdc</url>
  <id>d61fc082650d4f758fabdaa345a3f698a1791cdc</id>
  <committed-date>2009-06-07T06:38:36-07:00</committed-date>
  <authored-date>2009-06-07T06:38:36-07:00</authored-date>
  <message>added start_hour and end_hour options. bumped version to 0.2a</message>
  <tree>9a9dc5f3354dbe1f5a5cd21ef7038289e1a7cfd8</tree>
  <committer>
    <name>Anthony Amoyal</name>
    <email>TAmoyal@new-host-2.home</email>
  </committer>
</commit>
