0.0.3 ā€¢ Published 6 years ago

time-now-custom-element v0.0.3

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

time-now-custom-element

Open Source Love license js-semistandard-style package version install size dependecies

šŸ• Show updated current time in an html element. Date and time will automatically refresh every second.

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.