pub fn parse_date_string(input: &str) -> Option<i64>Expand description
Parse a Cypher ISO-8601 date string into a NaiveDate.
Accepts every form the TCK’s date(<string>) outline exercises:
| input | meaning | example |
|---|---|---|
2015-07-21 | calendar (extended) | 2015-07-21 |
20150721 | calendar (basic) | 2015-07-21 |
2015-07 | year-month | 2015-07-01 |
201507 | year-month (basic) | 2015-07-01 |
2015 | year only | 2015-01-01 |
2015-W30-2 | ISO week + weekday | 2015-07-21 |
2015W302 | ISO week + weekday | 2015-07-21 |
2015-W30 | ISO week (Monday) | 2015-07-20 |
2015W30 | ISO week (Monday) | 2015-07-20 |
2015-202 | ordinal (day of year) | 2015-07-21 |
2015202 | ordinal (basic) | 2015-07-21 |
Returns None for any string that is not one of these forms or that names
an out-of-range date.