parsers/rfc_3339

Types

pub type Datetime {
  Datetime(date: LocalDate, time: LocalTime, timezone: Timezone)
}

Constructors

  • Datetime(date: LocalDate, time: LocalTime, timezone: Timezone)
pub type LocalDate {
  LocalDate(year: Int, month: Int, day: Int)
}

Constructors

  • LocalDate(year: Int, month: Int, day: Int)
pub type LocalDatetime {
  LocalDatetime(date: LocalDate, time: LocalTime)
}

Constructors

  • LocalDatetime(date: LocalDate, time: LocalTime)
pub type LocalTime {
  LocalTime(
    hour: Int,
    minutes: Int,
    seconds: Int,
    precision: Option(Int),
  )
}

Constructors

  • LocalTime(
      hour: Int,
      minutes: Int,
      seconds: Int,
      precision: Option(Int),
    )
pub type RFC3339 {
  RFC3339Datetime(Datetime)
  RFC3339LocalDatetime(LocalDatetime)
  RFC3339LocalDate(LocalDate)
  RFC3339LocalTime(LocalTime)
}

Constructors

  • RFC3339Datetime(Datetime)
  • RFC3339LocalDatetime(LocalDatetime)
  • RFC3339LocalDate(LocalDate)
  • RFC3339LocalTime(LocalTime)
pub type Timezone {
  TimezoneZulu
  TimezonePositive(hour: Int, minutes: Int)
  TimezoneNegative(hour: Int, minutes: Int)
}

Constructors

  • TimezoneZulu
  • TimezonePositive(hour: Int, minutes: Int)
  • TimezoneNegative(hour: Int, minutes: Int)

Functions

pub fn parse(it: String) -> Result(RFC3339, String)
pub fn parser() -> fn(Stream(String)) ->
  Result(ParseSuccess(String, RFC3339), ParseError(String))
pub fn print(it: RFC3339) -> String
Search Document