|
@@ -22,29 +22,28 @@ today_early_1="$(date -d '1 days ago' +%Y%m%d)"
|
|
|
train_dates=()
|
|
|
|
|
|
init() {
|
|
|
- local count=1
|
|
|
-
|
|
|
- current_handle_date="$(date -d '2 days ago' +%Y%m%d)"
|
|
|
+ local count=0
|
|
|
+ local current_handle_date="$(date -d '2 days ago' +%Y%m%d)"
|
|
|
|
|
|
|
|
|
- while [[ $count -lt 8 ]]; do
|
|
|
+ while [[ $count -lt 7 ]]; do
|
|
|
|
|
|
- date_key=$(date -d "$current_handle_date" +%Y%m%d)
|
|
|
- echo $date_key
|
|
|
+ date_key=$(date -d "$current_handle_date -${count} day" +%Y%m%d)
|
|
|
+
|
|
|
+ echo "date_key: ${date_key}"
|
|
|
+
|
|
|
|
|
|
if [ $(is_holidays $date_key) -ge 0 ]; then
|
|
|
|
|
|
- train_dates+=("$date_key")
|
|
|
+ train_dates+=($date_key)
|
|
|
|
|
|
count=$((count + 1))
|
|
|
fi
|
|
|
|
|
|
|
|
|
- current_handle_date=$(date -d "$current_handle_date -1 day" +%Y%m%d)
|
|
|
+
|
|
|
done
|
|
|
|
|
|
- echo ${train_dates}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|