Function iso8601::date

source ·
pub fn date(string: &str) -> Result<Date, String>
Expand description

Parses a date string.

A string can have one of the following formats:

  • 2015-11-02 or 20151102
  • 2015-W45-01 or 2015W451
  • 2015-306 or 2015306

§Example

let date = iso8601::date("2015-11-02").unwrap();