File: str_parse_method.rs

package info (click to toggle)
rust-dateparser 0.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 244 kB
  • sloc: makefile: 2
file content (8 lines) | stat: -rw-r--r-- 206 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
use dateparser::DateTimeUtc;
use std::error::Error;

fn main() -> Result<(), Box<dyn Error>> {
    let parsed = "2021-05-14 18:51 PDT".parse::<DateTimeUtc>()?.0;
    println!("{:#?}", parsed);
    Ok(())
}