parse_iso_datetime

Function parse_iso_datetime 

Source
pub fn parse_iso_datetime(input: &mut &str) -> Result<TimeExpression>
Expand description

Parse ISO 8601 datetime format.

Supports various ISO datetime formats:

  • Date only: 2024-01-15
  • Date and time: 2024-01-15T14:30:00
  • With timezone: 2024-01-15T14:30:00Z
  • With offset: 2024-01-15T14:30:00+02:00
  • With fractional seconds: 2024-01-15T14:30:00.123Z

§Examples

// Parses: "2024-01-15T14:30:00Z"
// Into: TimeExpression::Absolute(AbsoluteTime { ... })