🚀
High Performance
Built with Aho-Corasick scanning, PHF dictionaries, and zero-allocation component storage for blazing fast parsing.
High-performance parsing for Rust, Swift, Kotlin, and Python
use whichtime_sys::WhichTime;
let parser = WhichTime::new();
let date = parser.parse_date("tomorrow at 3pm", None)?;
println!("{}", date.unwrap().to_rfc3339());import WhichtimeCore
let results = try parse(text: "tomorrow at 3pm")
if let millis = results.first?.dateMillis {
let date = Date(timeIntervalSince1970: Double(millis) / 1000.0)
print(date)
}import works.transcode.whichtime.*
val results = parse("tomorrow at 3pm")
results.firstOrNull()?.dateMillis?.let { millis ->
println(java.util.Date(millis))
}from whichtime import parse
from datetime import datetime
results = parse("tomorrow at 3pm")
if results and results[0].date_millis:
dt = datetime.fromtimestamp(results[0].date_millis / 1000.0)
print(dt)| Category | Examples |
|---|---|
| Casual dates | today, tomorrow, yesterday |
| Relative dates | in 2 hours, 3 days ago, next week |
| Weekdays | Monday, next Friday, last Tuesday |
| Explicit dates | 2024-12-25, December 25th |
| Time expressions | 3pm, 15:30, noon, midnight |
| Combined | tomorrow at 3pm, next Monday morning |