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

https://github.com/imp/chrono-humanize-rs

Human friendly time expressions. This is a mirror of the upstream, found at
https://github.com/imp/chrono-humanize-rs

Last synced: 12 months ago
JSON representation

Human friendly time expressions. This is a mirror of the upstream, found at

Awesome Lists containing this project

README

          

## Chrono Humanize - Make your text time representation human appealing

Build status

branch | status
:-------|:------:
master| [![Build Status](https://travis-ci.org/imp/chrono-humanize-rs.svg?branch=master)](https://travis-ci.org/imp/chrono-humanize-rs)
develop| [![Build Status](https://travis-ci.org/imp/chrono-humanize-rs.svg?branch=develop)](https://travis-ci.org/imp/chrono-humanize-rs)

## Quick Start

```rust
use chrono::{Local, Duration};
use chrono_humanize::HumanTime;

let dt = Local::now() + Duration::days(35);
let ht = HumanTime::from(dt);
let english = format!("{}", ht);
assert_eq!("in a month", english);
```