Interval field gives you a simple field and widget to allow users to enter interval values eg
- 2 months
- 3 days
- 4 years
The field comes pre-bundled with one simple formatter and second, minute, hour, day, week, fortnight, month, quarter and year interval periods.
The available periods can be easily extended by other modules (see interval.api.php for info).
- Core field module (obviously).
- Date API (submodule of date).
At present the module only has a basic formatter but the api is there to support more flexible displays such as relative to the current date/time or an arbitrary date.
Sponsored by Choc-Chip Media.
I did a session on fields, widgets and formatters at Drupal downunder 2012 - during which I discussed how this module works as an example of the field api. If you're interested you can view the presentation.