Ruby on Rails date_finder plugin

Posted by Daniel Butler Wed, 20 Sep 2006 13:07:00 GMT

Jonathan Viney of New Zealand has announced his date_finder plugin for Ruby on Rails. The plugin allows the following types of actions:

  • To find the next five Mondays and Fridays:
DateFinderBase.weekly.day(:monday).day(:friday).find(:max => 5)
  • To find the 10th of the month for the next five months:
DateFinderBase.monthly.day_number(10).find(:max => 5)
  • To find the last Thursday in September for the next 3 years
DateFinderBase.yearly.month (:september).day(:thursday).day_occurrence(:last).find(:max => 3)
  • To find the next 5 Wednesdays on a fortnightly basis (skips every second week):
DateFinderBase.weekly(2).day(:wednesday).find(:max => 5)

To install, execute script/plugin install http://svn.viney.net.nz/things/rails/plugins/date_finder.

Thanks, Jonathan.

Date Finder @ Ruby Plugins Directory

Posted in  | Tags  | no comments

Sponsored Links

Sponsored Links

Comments

(leave url/email »)

   Comment Markup Help Preview comment