Browse Source

rounding to emoji clock

Cherry NG 10 years ago
parent
commit
99e74b0498
1 changed files with 2 additions and 2 deletions
  1. 2 2
      plugins/emoji-clock/emoji-clock.plugin.zsh

+ 2 - 2
plugins/emoji-clock/emoji-clock.plugin.zsh

@@ -8,8 +8,8 @@
 # -----------------------------------------------------------------------------
 
 function emoji-clock() {
-  hour=$(date '+%I')
-  minutes=$(date '+%M')
+  hour=$(date -v '+15M' '+%I')
+  minutes=$(date -v '+15M' '+%M')
   case $hour in
     01) clock="๐Ÿ•"; [ $minutes -ge 30 ] && clock="๐Ÿ•œ";;
     02) clock="๐Ÿ•‘"; [ $minutes -ge 30 ] && clock="๐Ÿ•";;