pretty-time-webcomponent
v0.5.1
Published
A simple ultra lightweight VanillaJS Webcomponent to display time.
Downloads
2
Readme
pretty-time-(webcomponent)
A simple ultra lightweight VanillaJS Webcomponent to display time.
Installation
npm i -S pretty-time-webcomponent
Usage
Include pretty-time.js:
<head>
<!-- if you want to support legacy browser add the webcomponents-loader -->
<!-- <script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> -->
<script type="module" src="node_modules/pretty-time-webcomponent/pretty-time.js"></script>
...
<body>
<pretty-time milliseconds="16208020"></pretty-time>
4h 30m 8s
See the demo.html for examples.