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

Method toordinal

Lib/_pydatetime.py:1150–1156  ·  view source on GitHub ↗

Return proleptic Gregorian ordinal for the year, month and day. January 1 of year 1 is day 1. Only the year, month and day values contribute to the result.

(self)

Source from the content-addressed store, hash-verified

1148 0, 0, 0, -1)
1149
1150 def toordinal(self):
1151 """Return proleptic Gregorian ordinal for the year, month and day.
1152
1153 January 1 of year 1 is day 1. Only the year, month and day values
1154 contribute to the result.
1155 """
1156 return _ymd2ord(self._year, self._month, self._day)
1157
1158 def replace(self, year=None, month=None, day=None):
1159 """Return a new date with new values for the specified fields."""

Callers 15

ctimeMethod · 0.95
__add__Method · 0.95
__sub__Method · 0.95
weekdayMethod · 0.95
isoweekdayMethod · 0.95
_strptimeFunction · 0.80
ctimeMethod · 0.80
__add__Method · 0.80
__sub__Method · 0.80
calendar.pyFile · 0.80
timegmFunction · 0.80

Calls 1

_ymd2ordFunction · 0.85

Tested by 8

test_extreme_ordinalsMethod · 0.64
test_subclass_dateMethod · 0.64
test_more_timetupleMethod · 0.64
test_utctimetupleMethod · 0.64
fromutcMethod · 0.64
_find_tiMethod · 0.64