Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azzamsa/jiffy
Human friendly time expressions
https://github.com/azzamsa/jiffy
Last synced: 6 days 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 (5 months ago)
- Default Branch: master
- Last Pushed: 2024-08-08T06:29:44.000Z (5 months ago)
- Last Synced: 2024-08-09T02:18:51.647Z (5 months ago)
- Language: Rust
- Homepage:
- Size: 34.2 KB
- Stars: 0
- 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).