0.1.1 • Published 8 years ago
matthewmueller-clock v0.1.1
clock
Create a swiss railway inspired 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
0.1.1
8 years ago