From: James Herdman Date: 2008-06-04T09:59:13+09:00 Subject: Re: Commercial Calendar Calculations ------=_Part_2500_17847654.1212541201808 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Donald, I'm definitely interested in hearing about the details. I'll be having to deal with an RDBMS as well. James On Tue, Jun 3, 2008 at 4:34 PM, Donald Ball wrote: > On Tue, Jun 3, 2008 at 2:43 PM, James Herdman > wrote: > > I'm interested in doing calculations with a commercial calendar. For > > example, "Find every 2nd business day of the month for 2008". I'm > feeling a > > little long on how to approach the topic. Does anyone know of a library > I > > could leverage for such a thing (the ability to use said library in Rails > is > > a must)? If not, does anyone have experience that they could share on > the > > matter? > > The runt gem provides a nice library for working with recurring > events, it's probably got what you're looking for. > > Personally, I looked at runt for an event calendar I built sometime > last year, but it didn't end up being useful as I needed to be able to > store the events in a relational database and query for matching > events therein. To use runt, I'd have had to hydrate all of the events > whenever I wanted to run a query. That was too slow for my use case, > so I ended up doing it all in sql. I'll be happy to share the details > of that implementation if you're in a similar boat. > > - donald > > ------=_Part_2500_17847654.1212541201808--