If your answer was yes, then today is your lucky day!
Now with this package it is possible to parse
- hour, minute either as string or integer
- string in 'HH:MM' format
- Date
into an clock face emoji! WOAHH!
-
Install the package
npm install time-to-emoji --save
-
require the package
var clockface = require('time-to-emoji');
-
Use the function of your choice
clockface.time2emoji('HH','MM'); // with leading zeros clockface.time2emoji('H','M'); clockface.time2emoji(H,M); Date.prototype.toEmoji(); // usage: new Date().toEmoji(); clockface.date2emoji(new Date()); clockface.string2emoji('HH:MM');
Contribution is welcomed 👐