dartemporal 0.0.5

  • README.md
  • Installing
  • Versions
  • 30

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 complex 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

The API documentation can be found here: http://iburton.github.io/dartemporal/api/index.html


No custom exceptions are currently defined.


Build Status

So you think you found a bug? You are probably right! Please log an issue @ https://github.com/iburton/dartemporal/issues?state=open If you want to provide a test case we can add to the test suite to capture it next time, all the beter. We are using drone.io to continually test the library, the current build test status is above.


All roadmap items are tracked via github issues @ https://github.com/iburton/dartemporal/issues?state=open

Change Log

  • 0.0.4 (12-Jun-2016)
    • Tested against Dart 1.17.1, all tests passing
  • 0.0.4 (03-Jun-2014)
    • Updated for Dart 1.3.6 and unittest 0.11.0+1
  • 0.0.3 (18-Jul-2013)
    • Added openings() method to allow the location of range
  • 0.0.2 (16-Jul-2013)
    • Added toJson() methods to all TE's for long term storage
    • Added fromJson() methods to all TE's to get back TE objects from storage
    • Revamped test suite to include more robust unit testing and drone.io support
  • 0.0.1 (04-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.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  dartemporal: ^0.0.5

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:dartemporal/dartemporal.dart';
Version Uploaded Documentation Archive
0.0.5 Jun 12, 2016 Go to the documentation of dartemporal 0.0.5 Download dartemporal 0.0.5 archive
0.0.4 Jun 3, 2014 Go to the documentation of dartemporal 0.0.4 Download dartemporal 0.0.4 archive
0.0.3 Jul 18, 2013 Go to the documentation of dartemporal 0.0.3 Download dartemporal 0.0.3 archive
0.0.2 Jul 16, 2013 Go to the documentation of dartemporal 0.0.2 Download dartemporal 0.0.2 archive
0.0.1 Jul 4, 2013 Go to the documentation of dartemporal 0.0.1 Download dartemporal 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 20, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.69.0
  • pana: 0.11.7


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:dartemporal/dartemporal.dart.

Issues and suggestions

Maintain CHANGELOG.md.

Changelog entries help clients to follow the progress in your code.

Add SDK constraint in pubspec.yaml.

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

Package is too old.

The package was released more than two years ago.

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v1 release.

While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction of the API.

Maintain an example.

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use dartemporal.dart.

Format lib/dartemporal.dart.

Run dartfmt to format lib/dartemporal.dart.

Format lib/exceptions.dart.

Run dartfmt to format lib/exceptions.dart.

Fix additional 9 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/te_diff.dart (Run dartfmt to format lib/te_diff.dart.)
  • lib/te_inrange.dart (Run dartfmt to format lib/te_inrange.dart.)
  • lib/te_intersect.dart (Run dartfmt to format lib/te_intersect.dart.)
  • lib/te_is.dart (1 hint)
  • lib/te_isafter.dart (Run dartfmt to format lib/te_isafter.dart.)
  • lib/te_isbefore.dart (Run dartfmt to format lib/te_isbefore.dart.)
  • lib/te_not.dart (Run dartfmt to format lib/te_not.dart.)
  • lib/te_union.dart (Run dartfmt to format lib/te_union.dart.)
  • lib/texpression.dart (Run dartfmt to format lib/texpression.dart.)


Package Constraint Resolved Available
Direct dependencies
unittest >=0.11.0+1 <0.12.0 0.11.7 0.12.4+1
Transitive dependencies
path 1.6.2
stack_trace 1.9.3