Pyoda Time is an alternative date and time API for Python.
It helps you to think about your data more clearly, and express operations on that data more precisely.
This project is a Python port of Noda Time, an alternative DateTime library for .NET (which in turn was inspired by Joda Time).
The project goal is to provide a powerful alternative for time management in Python, drawing inspiration from the strengths of Noda Time and adapting them to a Pythonic API.
pip install pyoda-time
from pyoda_time import *
# Instant represents time from epoch
now: Instant = SystemClock.instance.get_current_instant()
# Convert an instant to a ZonedDateTime
now_in_iso_utc: ZonedDateTime = now.in_utc()
# Create a duration
duration: Duration = Duration.from_minutes(3)
# Add it to our ZonedDateTime
then_in_iso_utc: ZonedDateTime = now_in_iso_utc + duration
# Time zone support
london = DateTimeZoneProviders.tzdb["Europe/London"]
# Time zone conversions
local_date = LocalDateTime(2012, 3, 27, 0, 45, 0)
before = london.at_strictly(local_date)
For more information, see the docs.
Contributions of all kinds are welcome.
If you are interested in contributing to this project, please refer to the guidelines.
We express our gratitude to the authors and contributors of Noda Time and Joda Time for their pioneering work in the field of date and time management. Pyoda Time aspires to continue this tradition within the Python ecosystem.