Commit 3fe55ef
fix(date_range): snap weekly start to anchor before generating dates
For W/W-MON etc. frequencies, genFromStart and genBetween now call
snapToAnchor() to advance the cursor to the first occurrence of the
anchor weekday on or after the provided start date, matching pandas
behaviour where date_range('2024-01-01', periods=4, freq='W') returns
four Sundays rather than a Monday followed by three Sundays.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 0aabe21 commit 3fe55ef
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
416 | 430 | | |
417 | 431 | | |
418 | 432 | | |
419 | | - | |
| 433 | + | |
420 | 434 | | |
421 | 435 | | |
422 | 436 | | |
| |||
430 | 444 | | |
431 | 445 | | |
432 | 446 | | |
433 | | - | |
| 447 | + | |
434 | 448 | | |
435 | 449 | | |
436 | 450 | | |
| |||
0 commit comments