https://github.com/azzamsa/jiffy
Human friendly time expressions
https://github.com/azzamsa/jiffy
Last synced: 3 months ago
JSON representation
Human friendly time expressions
- Host: GitHub
- URL: https://github.com/azzamsa/jiffy
- Owner: azzamsa
- License: apache-2.0
- Created: 2024-08-07T22:56:59.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-08-08T06:29:44.000Z (11 months ago)
- Last Synced: 2025-02-11T13:54:01.921Z (5 months ago)
- Language: Rust
- Homepage:
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
---
Representation for jiff objects in human languages.
## Usage
```rust
use jiff::ToSpan;let dt = jiff::Zoned::now().checked_add(35.days()).unwrap();
let ht = jiffy::HumanTime::from(dt);
let english = format!("{}", ht);
assert_eq!("in a month", english);
```## More Examples
To learn more, see other [examples](examples/).
## Acknowledgement
`jiffy` is a direct port of [chrono-humanize](https://gitlab.com/imp/chrono-humanize-rs).