time-now-custom-element

0.0.3 • Public • Published

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.

/time-now-custom-element/

    Package Sidebar

    Install

    npm i time-now-custom-element

    Weekly Downloads

    2

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    5.8 kB

    Total Files

    4

    Last publish

    Collaborators

    • marinko-peso