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

Function _strptime_datetime_date

Lib/_strptime.py:786–791  ·  view source on GitHub ↗

Return a date instance based on the input string and the format string.

(cls, data_string, format="%a %b %d %Y")

Source from the content-addressed store, hash-verified

784 return time.struct_time(tt[:time._STRUCT_TM_ITEMS])
785
786def _strptime_datetime_date(cls, data_string, format="%a %b %d %Y"):
787 """Return a date instance based on the input string and the
788 format string."""
789 tt, _, _ = _strptime(data_string, format)
790 args = tt[:3]
791 return cls(*args)
792
793def _parse_tz(tzname, gmtoff, gmtoff_fraction):
794 tzdelta = datetime_timedelta(seconds=gmtoff, microseconds=gmtoff_fraction)

Callers

nothing calls this directly

Calls 2

_strptimeFunction · 0.85
clsClass · 0.50

Tested by

no test coverage detected