Commit 1d78292
refactor(powershell): drop redundant millisecond subtraction in backfill end date
The -Backfill default end date subtracted a millisecond to land on the last
day of the window, then had the time truncated away by .Date a few lines
later. For a midnight start date -- always the case here, since both
-StartDate sources are midnight -- AddMonths(1).AddMilliseconds(-1).Date and
AddMonths(1).AddDays(-1) are identical, so this is a no-op.
Using AddDays(-1) also makes the two default-end-date paths read the same;
the non-backfill branch below already computes it that way.
Note this is not the same as 'the last day of the month': with an explicit
-StartDate that is not the first (for example -StartDate '2026-03-15'
-Backfill 2), the window stays one month from the start date and ends
2026-04-14, not 2026-03-31.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 3ea191f commit 1d78292
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
0 commit comments