This project is not covered by Drupal’s security advisory policy.

Duration is a set of three modules, each for a different target audience:

  • duration_api provides a reusable Duration class and formatter functions for developers who need to do internal date calculations and conversions.
  • duration_element depends on duration_api and provides a set of form elements for entering durations, to be used in custom forms.
  • duration depends on both of the above and assembles the pieces into a CCK field, not requiring a single line of code to use it.

In order to add a new CCK field, go to the "Add fields" form and select any widget for the "Duration" field type. Configure, use, rejoice.

Developers can find the API documentation inside the module files, examples for using the form elements are provided in duration.example.

If this module doesn't fit your needs, the Date module might be worth a try.

This project was originally provided by zites.net internet solutions and sponsored by IPA (Internet Privatstiftung Austria) as part of the Netidee program.

Disclaimer

I (jpetso) am currently unable to put sufficient effort into maintaining this module, even if it doesn't really require a whole lot of work. I hope that my company will continue working on it eventually, but I can't tell for sure. If you want to improve the situation by contributing patches or even taking maintainership, please get in contact with me or fago.

Project information

Releases