diff options
| author | Baitinq <30861839+Baitinq@users.noreply.github.com> | 2021-11-02 09:59:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-02 09:59:09 +0000 |
| commit | 36382a2604a4b12cfffb748bbfc2b0080f0e635b (patch) | |
| tree | e7c4f7ab65e50d976043054dc2dee0acc839e419 /modules/daypercentage | |
| parent | c00842f1a2745f45d92653df0f08e4bd9ee8050f (diff) | |
| parent | 747bddd93a82c6c73a0a171c4fbfe4ef5ba93e91 (diff) | |
Merge pull request #29 from Baitinq/master
Fixed bug with the daypercentage module
Diffstat (limited to 'modules/daypercentage')
| -rwxr-xr-x | modules/daypercentage | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/daypercentage b/modules/daypercentage index 0b7b426..5a2316f 100755 --- a/modules/daypercentage +++ b/modules/daypercentage @@ -6,7 +6,7 @@ PREFIX=' ' get_daypercentage() { - MINUTES="$[$(date +%R | cut -d ':' -f1) * 60 + $(date +%R | cut -d ':' -f2) ]" + MINUTES="$[$(date +%R | cut -d ':' -f1 | sed 's/^0*//') * 60 + $(date +%R | cut -d ':' -f2) ]" echo "$PREFIX$(echo $[ $MINUTES * 100 / 1440 ] | sed 's/\..*//g')%" } |
