MCPcopy Index your code
hub / github.com/RustPython/RustPython / first_sunday_on_or_after

Function first_sunday_on_or_after

Lib/test/datetimetester.py:5569–5573  ·  view source on GitHub ↗
(dt)

Source from the content-addressed store, hash-verified

5567# Pain to set up DST-aware tzinfo classes.
5568
5569def first_sunday_on_or_after(dt):
5570 days_to_go = 6 - dt.weekday()
5571 if days_to_go:
5572 dt += timedelta(days_to_go)
5573 return dt
5574
5575ZERO = timedelta(0)
5576MINUTE = timedelta(minutes=1)

Callers 2

dstMethod · 0.85
dstMethod · 0.85

Calls 2

timedeltaClass · 0.90
weekdayMethod · 0.45

Tested by

no test coverage detected