matthewmueller-clock

0.1.1 • Public • Published

clock

Create a swiss railway inspired clock.

swiss clock

Installation

$ component install matthewmueller/clock

Example

var clock = new Clock;

clock.refresh();
document.body.appendChild(clock.el);

setInterval(function() {
  clock.refresh();
}, 1000);

API

Clock(hour, minute, second)

Initialize a Clock

Clock.refresh()

Refresh the clock to the current time

clock.refresh()

Clock.hour(hr)

Get or set the hour.

clock.hour(5)

Clock.minute(min)

Get or set the minute

clock.minute(30)

Clock.second(sec)

Get or set the second

clock.second(45)

License

MIT

/matthewmueller-clock/

    Package Sidebar

    Install

    npm i matthewmueller-clock

    Weekly Downloads

    1

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • mattmueller