MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _check_date_fields

Function _check_date_fields

tools/python-3.11.9-amd64/Lib/datetime.py:515–526  ·  view source on GitHub ↗
(year, month, day)

Source from the content-addressed store, hash-verified

513 (name, offset))
514
515def _check_date_fields(year, month, day):
516 year = _index(year)
517 month = _index(month)
518 day = _index(day)
519 if not MINYEAR <= year <= MAXYEAR:
520 raise ValueError('year must be in %d..%d' % (MINYEAR, MAXYEAR), year)
521 if not 1 <= month <= 12:
522 raise ValueError('month must be in 1..12', month)
523 dim = _days_in_month(year, month)
524 if not 1 <= day <= dim:
525 raise ValueError('day must be in 1..%d' % dim, day)
526 return year, month, day
527
528def _check_time_fields(hour, minute, second, microsecond, fold):
529 hour = _index(hour)

Callers 2

__new__Method · 0.85
__new__Method · 0.85

Calls 1

_days_in_monthFunction · 0.85

Tested by

no test coverage detected