Browse Source

multi days

yuehailiang 3 weeks ago
parent
commit
380d4a0ff5
1 changed files with 10 additions and 1 deletions
  1. 10 1
      ad/test_make_orign.sh

+ 10 - 1
ad/test_make_orign.sh

@@ -67,4 +67,13 @@ make_origin_data() {
 
 }
 
-make_origin_data
+end_date="20250628"
+date_offset=21        # 修改为需要向前推的天数
+
+# 循环计算并输出日期
+for ((i=0; i<=date_offset; i++)); do
+    # 计算当前偏移日期(结束日期 - i天)
+    today_early_1=$(date -d "$end_date - $i days" +%Y%m%d)
+    echo $today_early_1
+  make_origin_data
+done