Parse and stringify duration timestamps (such as hh:mm:ss and HhMmSs)
Node.js, Safari, and Google Chrome are supported.
Firefox is not supported, as Firefox must add support for named capture groups for regular expressions.
- Install:
npm install --save duration-timestamp
- Import:
import * as pkg from ('duration-timestamp')
- Require:
const pkg = require('duration-timestamp')
<script type="module">
import * as pkg from '//cdn.skypack.dev/duration-timestamp@^2.26.0'
</script>
<script type="module">
import * as pkg from '//unpkg.com/duration-timestamp@^2.26.0'
</script>
<script type="module">
import * as pkg from '//dev.jspm.io/duration-timestamp@2.26.0'
</script>
This package is published with the following editions:
duration-timestamp
aliasesduration-timestamp/index.cjs
which uses the Editions Autoloader to automatically select the correct edition for the consumer's environmentduration-timestamp/source/index.ts
is TypeScript source code with Import for modulesduration-timestamp/edition-browsers/index.js
is TypeScript compiled against ES2022 for web browsers with Import for modulesduration-timestamp/edition-es2022/index.js
is TypeScript compiled against ES2022 for Node.js 14 || 16 || 18 || 20 || 21 with Require for modulesduration-timestamp/edition-es2019/index.js
is TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modulesduration-timestamp/edition-es2019-esm/index.js
is TypeScript compiled against ES2019 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules
Discover the release history by heading on over to the HISTORY.md
file.
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
Unless stated otherwise all works are:
- Copyright © 2020+ Benjamin Lupton
and licensed under: