Remove 00 for hours or Minutes when the actual duration is less than an hour for Time formatter

Created on 23 September 2023, about 1 year ago

Problem/Motivation

When using the Time formatter, it is currently displaying "00" for hours when the actual duration is less than an hour which can be misleading and unnecessary.

Steps to reproduce

Go to settings and set formatter to Time format

Twig Result :

<div class="field__item">

<!-- THEME DEBUG -->
<!-- THEME HOOK: 'duration_field_duration_time' -->
<!-- BEGIN OUTPUT from 'modules/contrib/duration_field/templates/duration-field-duration-time.html.twig' -->

00:48:09

<!-- END OUTPUT from 'modules/contrib/duration_field/templates/duration-field-duration-time.html.twig' -->

</div>
📌 Task
Status

Closed: duplicate

Version

1.0

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024