Skip to content

Glossary: Python Beyond the Basics

datetime / timedelta

Also written: timedelta, datetime, date

`datetime` holds a date and a time, and `timedelta` is a length of time. Adding a timedelta moves a date forward, and subtracting two dates gives one.

Where the book teaches it

Related terms

format codes (dates)ZoneInfo