<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>I.NFECTIO.US: Rebuilt the Date Helper Library</title>
    <link>http://i.nfectio.us/articles/2006/02/12/rebuilt-the-date-helper-library</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>"Nothing in life is worth doing if you have no life while doing it"</description>
    <item>
      <title>Rebuilt the Date Helper Library</title>
      <description>&lt;p&gt;So I locked myself in my office Saturday and decided to rebuild the sorely lacking date_helper.rb that comes with Rails.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;It was quite the daunting task for there were no less than 12 existing tickets for bug fix/enhancements. 17 hours later, a new date_helper was born that resolves all the issues and its quite DRY as well. Now we just gotta hope the developers get a chance to look at it sometime. Some of the fixes it contains have been around for ages so I'm assuming the core members don't use dates very often in their applications.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;
Heres a CHANGELOG:
&lt;ul&gt;
&lt;li&gt;Makes :discard_year work without breaking multi-attribute parsing in AR. &lt;a href="http://dev.rubyonrails.org/ticket/1260"&gt;#1260&lt;/a&gt; &lt;a href="http://dev.rubyonrails.org/ticket/3800"&gt;#3800&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Adds html id attribute to each element. &lt;a href="http://dev.rubyonrails.org/ticket/1050"&gt;#1050&lt;/a&gt; &lt;a href="http://dev.rubyonrails.org/ticket/1382"&gt;#1382&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Adds :index and @auto_index capability to model driven date/time selects. &lt;a href="http://dev.rubyonrails.org/ticket/847"&gt;#847&lt;/a&gt; &lt;a href="http://dev.rubyonrails.org/ticket/2655"&gt;#2655&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Add :order to datetime_select, select_datetime and select_date. &lt;a href="http://dev.rubyonrails.org/ticket/1427"&gt;#1427&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Make scaffolding work with database time values. &lt;a href="http://dev.rubyonrails.org/ticket/2489"&gt;#2489&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Added time_select to work with time values in models. &lt;a href="http://dev.rubyonrails.org/ticket/2833"&gt;#2833&lt;/a&gt; &lt;a href="http://dev.rubyonrails.org/ticket/2489"&gt;#2489&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Added :include_seconds to select_datetime, datetime_select and time_select. &lt;a href="http://dev.rubyonrails.org/ticket/2998"&gt;#2998&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;All date/datetime selects can now accept an array of month names with :use_month_names. Allows for localization. &lt;a href="http://dev.rubyonrails.org/ticket/363"&gt;#363&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Adds :date_separator to select_datetime. Preserves BC.&lt;/li&gt;

&lt;li&gt;Adds :time_separator to select_time. Preserves BC.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;</description>
      <pubDate>Sun, 12 Feb 2006 08:39:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:569be42f5b58f8d45a96cc7e604e752c</guid>
      <author>Bob Silva</author>
      <link>http://i.nfectio.us/articles/2006/02/12/rebuilt-the-date-helper-library</link>
      <category>Ruby on Rails</category>
    </item>
    <item>
      <title>"Rebuilt the Date Helper Library" by kad</title>
      <description>Hi Bob... 

I found your post and realize that no fixes have been done yet to the date_helper  lib by core dev team ( I use 1.1.6) and I need some of the fixes you've done... where can I download or get your lib ?

ex : I need a date_slect with options like discard_day and order = [:month, :year] ... do you have any idea on why these options are not in the standard lib ?

thansk for replying

kad</description>
      <pubDate>Thu, 28 Sep 2006 14:06:44 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:09e57a1d-54ff-4f35-8f63-42aee5035c0c</guid>
      <link>http://i.nfectio.us/articles/2006/02/12/rebuilt-the-date-helper-library#comment-167</link>
    </item>
  </channel>
</rss>
