README.md

# datetime_iso8601

Parse ISO8601 date-times! But you should probably use RFC3339 instead

[![Package Version](https://img.shields.io/hexpm/v/datetime_iso8601)](https://hex.pm/packages/datetime_iso8601)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/datetime_iso8601/)

The ISO8601 date-time format is complex. Unless you have particular need for
things like `2024-W11` you are better off using the RFC3339 format, which the
`gleam_time` package supports.

```sh
gleam add datetime_iso8601@1
```
```gleam
import datetime_iso8601

pub fn main() -> Nil {
  assert datetime_iso8601.parse("2024-W11")
    == Ok(datetime_iso8601.YearWeek(2024, 11))
}
```

Documentation can be found at <https://hexdocs.pm/datetime_iso8601>.