Knap.md
LogicFiltersVariablesAPIGitHub ↗

Guide

VariablesLogicFilters

Reference

API

Project

GitHub ↗npm ↗

duration

Format seconds or an ISO 8601 duration.

Filters/duration

Syntax

{{ value | duration }}{{ value | duration:"H:mm:ss" }}

Example

01

Basic usage

InputTS
1{2  "seconds": 36653}
TemplateKNAP
1{{ seconds | duration:"H:mm:ss" }}
OutputKNAP
11:01:05

Behavior

  • The optional format supports H, HH, mm, and ss tokens.

Related filters

dateFormat a date with Day.js format tokens.
Previous← date_modifyNextcamel →
Knap is open source under the MIT license.View source ↗

On this page

SyntaxExamplesBehaviorRelated filters
duration filter — Knap