Duration
Default
Preview
Config
Value (seconds)
Duration in seconds.
Precision
Smallest unit to show, or auto.
Max Precision
Largest unit to show.
Pad
Pad values to fixed length.
Show Zero Parts
Show zero-value parts.
Precision: Minutes
[precision="minutes"]
Preview
Precision: Auto
[precision="auto"]
Preview
Padding
[pad="true"]
Preview
Show Zero Parts
[show-zero-parts="true"]
Preview
API
| Attribute | Type | Default | Description |
|---|---|---|---|
value | number | — | Required. Duration in seconds. |
precision | seconds | minutes | hours | days | auto | seconds | Smallest unit to show. auto shows the highest non-zero unit and the next. |
max-precision | milliseconds | seconds | minutes | hours | days | days | Largest unit to show. |
pad | boolean | false | Pad values to fixed length. |
show-zero-parts | boolean | false | Show zero-value parts. Last part is always shown even if zero. |