Crates.io | human-date-parser |
lib.rs | human-date-parser |
version | 0.2.0 |
source | src |
created_at | 2023-01-21 23:21:17.526081 |
updated_at | 2024-09-05 21:54:46.46818 |
description | Parses strings that express dates in a human way into ones usable by code. |
homepage | https://github.com/technologicalMayhem/human-date-parser |
repository | https://github.com/technologicalMayhem/human-date-parser |
max_upload_size | |
id | 764646 |
size | 42,474 |
Parses strings that express dates in a human way into ones usable by code.
Using it is as simple as calling from_human_time
with a string slice. Like this:
use human_date_parser::from_human_time;
fn main() {
let date = from_human_time("Last Friday at 19:45").unwrap();
println!("{date}");
}
You can also use the example to try out a few dates and see what it can and can't parse. Simply run cargo run --example stdin
.
Currently the following kinds of formats are supported:
If you find issues or opportunities for improvement do let me know by creating a issues on this projects GitHub page.