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

Merge pull request #3011 from cherrry/master

rounding to emoji clock
This commit is contained in:
Robby Russell 2014-08-31 11:45:10 -07:00
commit 244a6f23e5

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="🕝";;