Skip to content

matthewmueller/clock

Repository files navigation

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

About

Create a swiss railway inspired clock.

Resources

Stars

Watchers

Forks

Packages

No packages published