mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-19 16:22:01 +00:00
周号超出任何算法(W54 以上)的认不出、算起止超出日期范围的当这一周没有(复核 R3 补):认不出算法时原来按周号排先后,「2026-W99」也会当一周收下,现在周号大于 53 的不当周号写法,原因里照实举它;按算法算起止时日子超出日期能表示的范围(公元 9999 年末)交回没有这一周,不抛异常
This commit is contained in:
@@ -140,3 +140,10 @@ def test_a_plain_date_column_is_a_day_even_when_two_values_are_a_week_apart():
|
||||
assert pd.parse_compared(["2026-10-13", "2026-10-20"], plain, "day", "sqlite")[1] == "day"
|
||||
assert pd.parse_compared(["2026-10-12", "2026-10-19"], starts, "week", "sqlite")[1] == "week"
|
||||
assert pd.parse_compared(["2026-09-01", "2026-10-01"], plain, "day", "sqlite")[1] == "month"
|
||||
|
||||
|
||||
|
||||
def test_week_numbers_out_of_any_algorithm_are_unreadable():
|
||||
assert pd.parse(["2026-W41", "2026-W99"]) is None
|
||||
assert pd.unreadable(["2026-W41", "2026-W99"]) == ("shape", ["2026-W99"])
|
||||
assert pd.week_span("sunday_year", 9999, 53) is None and pd.week_span("iso", 0, 1) is None
|
||||
|
||||
Reference in New Issue
Block a user