Java Date Library for recurring events

I am writing an application that should support dates and date ranges for events. I would especially like to have reliable support for regularly recurring events, such as store opening hours or regular trips. I would like to be able to support the user entering the request, for example:

"We are open from 8:00 to 18:00 every weekday, and 8 am on Saturdays."
"I am available every Friday from 18:00 to 20:00, except for the third Friday of every month."
"Recurring meeting on the 25th of each month"
"A recurring meeting every 28 days starting on November 3"

And then, quickly finding out whether the specified DateTime falls within the specified boundaries or where it overlaps between two user-specified time values.

Is there a library that could satisfy my needs?

edit: To clarify, I don’t really need to parse the language naturally, just complex intervals and overlaps.

+4
source share
1 answer

You should take a look at Joda-Time http://joda-time.sourceforge.net/ . This is pretty much the best Java data library, and I think you could use intervals to indicate when a store is open: An interval in Joda-Time is an interval of time from one moment to another moment.
You should also take a look at http://code.google.com/p/google-rfc-2445/ as it seems closer to the recurring events that you want to use. Also I think this library actually uses Joda Time.

+4
source

All Articles