whichtime 0.1.0

High-level Rust API for natural language date parsing
Documentation

whichtime

whichtime is a natural language date parsing library for Rust.

It provides the ergonomic, high-level API for parsing phrases like "tomorrow at 3pm", "next Friday", or "in two weeks" across the locales supported by the project.

Installation

[dependencies]
whichtime = "0.1"

Example

use whichtime::WhichTime;

fn main() -> whichtime::Result<()> {
    let parser = WhichTime::new();

    if let Some(date) = parser.parse_date("tomorrow at 3pm", None)? {
        println!("{}", date.to_rfc3339());
    }

    Ok(())
}

Documentation