1

How can I show "time period" in one concrete time unit?

E.g.: I have a movie node type with "length" field with display formatted by time period. But if you put more then 60 minutes into it then it's displayed as "1h XX m".

I've tried to tweak this widget in settings but there is only "Granularity." which allows me to limit display to one hour ("1h") without minutes.

How can I format time period only in one time unit (e.g.: in only hours or in only minutes or in only seconds)?

2 Answers 2

1

Perhaps it would be simplest to just use an integer field?

  • Set the field type to Integer
  • Click save, and then on the following page you should be able to set a "Suffix" of 'mins' or 'minutes' as you prefer.
  • If you want a space between the number and minutes, be sure to type that at the start of the suffix field.
1

The time period module is in beta and minimally maintained. I would suggest using the Interval Module:

Interval field gives you a simple field and widget to allow users to enter interval values eg

  • 2 months
  • 3 days
  • 4 years

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.