- moment.js
- moment-timezone.js
- angular-expressions
npm install --save clocked
var Clock = require('clocked'),
el = document.createElement('div');
var clock = new Clock(el, {
autoStart: false
});
clock.start();
- Element Can be a valid selector a htmlElement (any instance of Node)
- Options:
- autoStart [default true] - Automaticall start when instantiated
Between 6 am - 5pm, clock color is orange, otherwise gray. The color follows the sun. The colors are overridable
new Clock('#clock', {
colors: {
'day': 'red',
'night': 'black'
}
});
Todos:
- Tests!
- Make clock instances configurable.
- Make clock color configurable.
- Instantiate with element.
- Generate svg element within constructor.