MCPcopy Index your code
hub / github.com/python/cpython / combine

Method combine

Lib/_pydatetime.py:1940–1950  ·  view source on GitHub ↗

Construct a datetime from a given date and a given time.

(cls, date, time, tzinfo=True)

Source from the content-addressed store, hash-verified

1938
1939 @classmethod
1940 def combine(cls, date, time, tzinfo=True):
1941 "Construct a datetime from a given date and a given time."
1942 if not isinstance(date, _date_class):
1943 raise TypeError("date argument must be a date instance")
1944 if not isinstance(time, _time_class):
1945 raise TypeError("time argument must be a time instance")
1946 if tzinfo is True:
1947 tzinfo = time.tzinfo
1948 return cls(date.year, date.month, date.day,
1949 time.hour, time.minute, time.second, time.microsecond,
1950 tzinfo, fold=time.fold)
1951
1952 @classmethod
1953 def fromisoformat(cls, date_string):

Callers 1

__add__Method · 0.45

Calls 1

clsClass · 0.50

Tested by

no test coverage detected