node-emoji-clock
v0.1.0
Published
π Time to show time properly π
Downloads
20
Readme
π node-emoji-clock: It's time to show time π
Shows time with emoji
Install
npm install node-emoji-clock
Usage
With Date
object:
const clock = require('node-emoji-clock');
const time = new Date();
console.log(time);
// 2016-06-17T20:41:02.705Z
console.log(clock.timeToEmoji(time));
// π
console.log(clock.timeToEmoji(time, { utc: true }));
// π£
time.setHours(9);
time.setMinutes(12);
console.log(clock.timeToEmoji(time));
// π
console.log(clock.timeToEmoji(time, { utc: true })); // '
// π
With momentjs object:
const clock = require('node-emoji-clock');
const moment = require('moment');
const mTime = moment();
console.log(mTime.toString());
// Fri Jun 17 2016 17:41:02 GMT-0300
console.log(clock.timeToEmoji(mTime));
// π
console.log(clock.timeToEmoji(mTime, { utc: true }));
// π£
mTime.hour(9);
mTime.minute(12);
console.log(clock.timeToEmoji(mTime));
// π
console.log(clock.timeToEmoji(mTime, { utc: true }));
// π
License
The MIT License