** Won’t work on Windows **
Getdate_column is designed to make the accessor methods of a datetime
column accept and return string representations of the date (e.g.
“today”, “10 days from now”, “1/2/06 10pm”). I personally find date
controls on the web to be clumsy, and would prefer to just have a text
field where I can enter a reasonable representation of a date.
class Event < ActiveRecord::Base
getdate_column :finish, :date_format => :short
e = Event.new
=> #<Event:0x252e240 … >
e.start = “tomorrow”
=> “July 28, 2006 09:12”
=> Fri Jul 28 09:12:39 PDT 2006
This plugin requires the ruby-getdate binding from tua.ch, which is
packaged with this plugin for your convenience. To install it:
sudo make install