Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        


jiffy









---

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).