https://github.com/oscarmorrison/moment-emoji
🕔 library that returns the approximate emoji for the time
https://github.com/oscarmorrison/moment-emoji
Last synced: 5 months ago
JSON representation
🕔 library that returns the approximate emoji for the time
- Host: GitHub
- URL: https://github.com/oscarmorrison/moment-emoji
- Owner: oscarmorrison
- License: mit
- Created: 2019-07-04T13:09:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-04T22:51:36.000Z (almost 7 years ago)
- Last Synced: 2025-01-22T13:19:24.486Z (over 1 year ago)
- Homepage: http://oscarmorrison.com/moment-emoji/
- Size: 13.7 KB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# moment-emoji
🕔 library that returns the approximate emoji for the time
## Use
- ensure you have [moment](https://github.com/moment/moment/) (hard requirement), loaded first
- src moment-emoji.js (or copy in file into your js)
on any moment time, just called `moment().emoji()`
```
var time = moment();
var emoji = time.emoji();
console.log(time.format('hh:mm'), emoji);
```
## Demo
http://oscarmorrison.com/moment-emoji/

## Usecase
Why would anyone ever use this? I used it for a quick [uebersicht](https://github.com/felixhageloh/uebersicht) widget that I made.

## Caveat
This was made on MacOS, not sure if it works on other platforms.