ID EN
Datetime

toordinal

Python 3.11

Return the proleptic Gregorian ordinal of the date, where January 1 of year 1 has ordinal 1. For any date object d, date.fromordinal(d.toordinal()) == d.

Syntax

PYTHON
date.toordinal()

See Also

date