1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 13:50:09 +00:00

rounding to emoji clock

This commit is contained in:
Cherry NG 2014-08-09 21:40:56 +08:00
parent 1b7a3ea99a
commit 99e74b0498

View file

@ -8,8 +8,8 @@
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
function emoji-clock() { function emoji-clock() {
hour=$(date '+%I') hour=$(date -v '+15M' '+%I')
minutes=$(date '+%M') minutes=$(date -v '+15M' '+%M')
case $hour in case $hour in
01) clock="🕐"; [ $minutes -ge 30 ] && clock="🕜";; 01) clock="🕐"; [ $minutes -ge 30 ] && clock="🕜";;
02) clock="🕑"; [ $minutes -ge 30 ] && clock="🕝";; 02) clock="🕑"; [ $minutes -ge 30 ] && clock="🕝";;