Browse Source

Merge pull request #3011 from cherrry/master

rounding to emoji clock
Robby Russell 10 years ago
parent
commit
244a6f23e5
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() {
 function emoji-clock() {
-  hour=$(date '+%I')
-  minutes=$(date '+%M')
+  hour=$(date -v '+15M' '+%I')
+  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="๐Ÿ•";;