https://github.com/tktech/pyjiff
Python bindings to the Jiff datetime library
https://github.com/tktech/pyjiff
datetime python
Last synced: 10 months ago
JSON representation
Python bindings to the Jiff datetime library
- Host: GitHub
- URL: https://github.com/tktech/pyjiff
- Owner: TkTech
- License: other
- Created: 2024-07-22T08:39:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-25T02:54:09.000Z (over 1 year ago)
- Last Synced: 2025-04-03T05:08:43.529Z (10 months ago)
- Topics: datetime, python
- Language: Rust
- Homepage: https://tkte.ch/pyjiff/
- Size: 27.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyjiff
Python bindings for [Jiff][], a date-time library for Rust that
encourages you to jump into the pit of success.
## Documentation
See https://tkte.ch/pyjiff/ for the most recent release documentation.
## Example
```python
from jiff import Zoned, Timestamp, Span
ts = Timestamp.from_string("2024-07-11T01:14:00Z")
span = Span()
span.months = 1
span.hours = 2
zoned = ts.intz("America/New_York") + span
assert str(zoned) == "2024-08-10T23:14:00-04:00[America/New_York]"
```
[Jiff]: https://github.com/BurntSushi/jiff