Skip to content

Latest commit

 

History

History
65 lines (39 loc) · 722 Bytes

Readme.md

File metadata and controls

65 lines (39 loc) · 722 Bytes

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