[−][src]Crate htp
HTP
(H)uman (T)ime (P)arser.
Example
use chrono::{Utc, TimeZone}; use htp::parse; let now = Utc.datetime_from_str("2020-12-24T23:45:00", "%Y-%m-%dT%H:%M:%S").unwrap(); let expected = Utc.datetime_from_str("2020-12-18T19:43:00", "%Y-%m-%dT%H:%M:%S").unwrap(); let datetime = parse("last friday at 19:43", now).unwrap(); assert_eq!(datetime, expected);
Modules
interpreter | |
parser |
Enums
HTPError |
Functions
parse |