What is this thing?

This is a library implementing portions of Martin Folwers temporal patterns discussed in this paper: http://martinfowler.com/apsupp/recurring.pdf. It allows for simple implementations of complex recurrence events. This library can be used for calculating recurrance of appointments or events, for testing membership into a comple recurrance range, etc. See example link below to see it in action.

Where can I get it?

It is located in the Dart Pub Directory as dartemporal, or can be found on GitHub at https://github.com/iburton/dartemporal.

How do I use it?

All classes in this library inherit from the TExpression class. They implement the following methods: - includes(DateTime date) which allows you to test if a date is included in a Temporal Expression (TE). - toString() will give you a rough text output of the defined TE (not yet implemented) - first() returns a DateTime object that identifies the start date of the range covered by the TE. Returns null if it is not defined. - last() returns a DateTime object that identifies the end date of the range covered by the TE. Returns null if it is not defined. - dates() which returns the next n datetimes that match based on a duration and base datetime. - Multiple constructors depending on the data type being worked with

An example case can be found here: https://github.com/iburton/DarTemporal/wiki/At-a-glance

Exceptions

No custom exceptions are currently defined.

TODO

  • Roadmap 0.0.2 - Check for an available range given a TE

  • Roadmap 0.0.3 - Ability to JSON-ify TE's and recreate them from JSON.

  • Roadmap 0.0.4 - Add toString() methods

  • Roadmap 0.0.5 - Better handling of the NOT TE

    - It needs to handle first() last() better, which means the constructors will likely want to calculate this instead of the bogus way it is currently being handled.
    

Change Log

  • 0.0.1 (4-Jul-2013) - Initial Release

Authors and Contributors

To date, all code has been written by Ira Burton (@iburton), a very rookie Dart programmer. If something is not working correctly, it is likely because he made some sort of dunderheaded mistake. Please feel free to thoroughly bash him for all mistakes so he can learn the right way to do it. There is no pride of authorship here.

Libraries

dartemporal