[script][log_editor] bug fix in end date calculation
This commit is contained in:
parent
bed730be16
commit
faabe8ef21
@ -103,7 +103,7 @@ toMail () {
|
|||||||
day_to_monday=$(($curr_day -1))
|
day_to_monday=$(($curr_day -1))
|
||||||
day_to_friday=$((5 - $curr_day))
|
day_to_friday=$((5 - $curr_day))
|
||||||
start_date=$(date --date="$((date_arg + day_to_monday)) days ago" +%Y-%m-%d)
|
start_date=$(date --date="$((date_arg + day_to_monday)) days ago" +%Y-%m-%d)
|
||||||
stop_date=$(date --date="$((date_arg + day_to_friday)) days" +%Y-%m-%d)
|
stop_date=$(date --date="$((date_arg - day_to_friday)) days ago" +%Y-%m-%d)
|
||||||
echo "Weekly $start_date -> $stop_date"
|
echo "Weekly $start_date -> $stop_date"
|
||||||
view $1
|
view $1
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ sendMail () {
|
|||||||
day_to_monday=$(($curr_day -1))
|
day_to_monday=$(($curr_day -1))
|
||||||
day_to_friday=$((5 - $curr_day))
|
day_to_friday=$((5 - $curr_day))
|
||||||
start_date=$(date --date="$((date_arg + day_to_monday)) days ago" +%Y-%m-%d)
|
start_date=$(date --date="$((date_arg + day_to_monday)) days ago" +%Y-%m-%d)
|
||||||
stop_date=$(date --date="$((date_arg + day_to_friday)) days" +%Y-%m-%d)
|
stop_date=$(date --date="$((date_arg - day_to_friday)) days ago" +%Y-%m-%d)
|
||||||
view $1 |mail -s "Weekly $start_date -> $stop_date" $USER@dxo.com
|
view $1 |mail -s "Weekly $start_date -> $stop_date" $USER@dxo.com
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user