在两个给定日期之间每隔一天自动填充一次

Auto-populate every second day between two given dates

我目前正在使用 this article 中的公式自动填充给定日期之间的日期列:

=ArrayFormula(TO_DATE(row(indirect("A"&A2):indirect("A"&B2))))

如何调整公式以给出每个 的日期?文章中的 D 栏会说:

=ARRAYFORMULA(FILTER(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2))),
                 MOD(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2))), 2)))

=ARRAYFORMULA(FILTER(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2))),
               ISODD(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2))))))

=ARRAYFORMULA(FILTER(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2))),
              ISEVEN(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2))))))

It seems like the formula skips a day if the start date is an odd date. Can this be corrected?

=ARRAYFORMULA(FILTER(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2))),
 MOD(ROW(INDIRECT("A1:A"&COUNTA(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2)))))), 2)))