https://github.com/alexhsamuel/ora
Standalone time and date implementation for C++ and Python.
https://github.com/alexhsamuel/ora
calendar cplusplus python time time-zone
Last synced: about 1 year ago
JSON representation
Standalone time and date implementation for C++ and Python.
- Host: GitHub
- URL: https://github.com/alexhsamuel/ora
- Owner: alexhsamuel
- License: other
- Created: 2015-12-16T00:52:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-07-22T20:19:07.000Z (almost 2 years ago)
- Last Synced: 2025-04-14T11:12:12.960Z (about 1 year ago)
- Topics: calendar, cplusplus, python, time, time-zone
- Language: C++
- Homepage: https://ora.readthedocs.io
- Size: 3.39 MB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](http://ora.readthedocs.io/en/latest/?badge=latest)
Ora is a freestanding time and date implementation for C++ and Python.
Docs at [http://ora.readthedocs.io/en/latest/](http://ora.readthedocs.io/en/latest/).
# Motivation
Many Python time libraries already exist, including the standard library
`datetime` module.
Ora provides:
- An opinionated, concise API centered around physical times.
- Built-in time zones.
- High performance for all operations.
- Multiple widths and precisions for times and dates.
- Rich C++ interoperability.
Ora is not a drop-in replacement for `datetime` or other Python time libraries,
but supports easy interoperability.
# Limitations
Ora is currently prerelease software; bugs are plentiful, and APIs are subject
to change.
### Scope
Similar to `datetime`, Ora uses the
([proleptic](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar))
Gregorian calendar, for years 1 – 9999 only. Alternate calendars and
B.C.E. dates are not provided. There is no support for leap seconds,
relativistic effects, or astronomical times. However, time precision of 1 ns
or smaller is supported.
### Platform
- Requires C++17 and Python 3.6+.
- Tested on Linux and MacOS. Currently no Windows support.
- Tested on x86-64 only.
# Installation
Ora is distributed:
- On [PyPI](https://pypi.python.org/pypi/ora), as source and Linux x64 / MacOS
binary wheels:
```
pip install ora
```
- On [Anaconda](https://anaconda.org/alexhsamuel/ora), as Linux x64 / MacOS
conda packages:
```
conda install -c alexhsamuel ora
```
- On [GitHub](https://github.com/alexhsamuel/ora).
Building from source requires a C++14 compiler. See
[developing.md](developing.md) for more information.