time-now-custom-element
Demo available here.
Install
Available via npm:
npm i time-now-custom-element
Usage
Install via npm or include the now-element.js
in your html page and simply add <x-time-now></x-time-now>
element.
format
propery is optional with following rules:
-
Y
: year number (example: 2018) -
M
: month number (example: 09) -
B
: month name (example: September) -
D
: day number (example: 2) -
C
: day name (example: Tuesday) -
h
: hours number (example: 23) -
m
: minutes number (example: 55) -
s
: seconds number (example:12)
Default format: Y-M-D h:m:s
which yields: 2018-09-07-Sunday 01:42:34
License
MIT.