Allow option for yesterday's stats to contain any value

This commit is contained in:
Michael De Roover 2020-08-12 13:47:44 +02:00
parent 6fbc0f75d2
commit a55248f232
Signed by: vim
GPG Key ID: 075496E232CE04CB
1 changed files with 1 additions and 1 deletions

2
cv
View File

@ -10,7 +10,7 @@ country=$1
[ -z $ydate ] && ydate=$(date -d yesterday $dfmt)
# Get yesterday's stats for queries after midnight.
if [ "$2" == "yesterday" ]
if [ ! -z $2 ]
then
date=$(date -d yesterday $dfmt)
ydate=$(date -d "2 days ago" $dfmt)