Plain time field
Categories
Component ID
2919345
Component name
Plain time field
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Component created
Component changed
Component body
A time field for Drupal 8.
It's based on the datetime module, which means that:
- The DB storage is of string type
- The Time class wraps the DrupalDateTime class and only uses it's time part
Why using the DrupalDateTimeClass? It's useful because there's no need to reinvent the wheel (formatting and parsing functions, calculations etc.)
Beware: no time zone information is stored. By using just the time and not the date, storing the time zone doesn't make much sense
Actually it only supports a single value, the plan is to add:
- An end time
- A formatter to display a duration, in case the field has both a start and an end time
- When the Libraries module will be ready for Drupal 8, maybe add a jQuery datepicker