views:

85

answers:

1

This question is kind of a subset of 90308

I'm looking for a good date library in any language which can handle periodic concepts

Date Ranges/sets which are independent of year:

  dr = 1 May - 31 August

  (4 May 2010) in dr

true

  (4 May 2011) in dr

true

  (4 March 2012) in dr

false

Day sets:

  ds = m tu w sa su

  (Mon, 4 May 2010) in ds

true

  (Thurs, 7 May 2010) in ds

false

Also nice set-like operations of the above such as intersection, union and inverse

Any ideas?

+1  A: 

If you are familiar with C++, you can use boost::date_time. See the example at http://www.boost.org/doc/libs/1_38_0/doc/html/date_time/examples.html#date_time.examples.date_period_calc

Amit Kumar
Looks interesting, unfortunately c++ is not an option productivity wise.
EoghanM