An alternative datetime library for Python.
Project description
Pyoda Time
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.
Quick Start
Installation:
pip install pyoda-time
Examples:
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
Contributions of all kinds are welcome.
If you are interested in contributing to this project, please refer to the guidelines.
Acknowledgements
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyoda_time-0.10.0.tar.gz.
File metadata
- Download URL: pyoda_time-0.10.0.tar.gz
- Upload date:
- Size: 4.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24fa956ce326f2a059b26c99a553bb97b63faba67189be2ed79e33c423e6369c
|
|
| MD5 |
b7a7b7eb21280dd3ca4bbf0332ebc00d
|
|
| BLAKE2b-256 |
b9dc01ad630773d4a8904f4b0f0d4f2d91c327b772fb01db234008a8b21bd1f8
|
File details
Details for the file pyoda_time-0.10.0-py3-none-any.whl.
File metadata
- Download URL: pyoda_time-0.10.0-py3-none-any.whl
- Upload date:
- Size: 431.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5b0247a9ad2117c612f68c149f8b7cd3bf1e3aa76b8848eeb934fe8934e637a
|
|
| MD5 |
226bdaa1522483ec1c458af398324af7
|
|
| BLAKE2b-256 |
051a4ac00cfd04dc872dfcd3e46464e957e38dd787e9eb363d21ab801fad1a6c
|