pub struct EnDateParser {}Trait Implementations§
Source§impl DateParser for EnDateParser
The EnDateParser can be used to parse english date information out of strings.
impl DateParser for EnDateParser
The EnDateParser can be used to parse english date information out of strings.
use date_time_parser_multi_language::{DateFormat, DateParser, EnDateParser, StartDayOfWeek};
fn main() {
let some_input = "Remind me that I have to check my mails tomorrow.";
let now = chrono::Utc::now().naive_local().date();
let date = EnDateParser::search_relative_date_expression(some_input, &now, &DateFormat::DayMonthYear, &StartDayOfWeek::Monday);
println!("I found the date {:?}", date);
}fn search_relative_date_expression( text: &str, now: &NaiveDate, date_format: &DateFormat, start_day_week: &StartDayOfWeek, ) -> Option<NaiveDate>
Auto Trait Implementations§
impl Freeze for EnDateParser
impl RefUnwindSafe for EnDateParser
impl Send for EnDateParser
impl Sync for EnDateParser
impl Unpin for EnDateParser
impl UnsafeUnpin for EnDateParser
impl UnwindSafe for EnDateParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more