https://github.com/badboy/iso8601
Parsing ISO8601 dates using nom
https://github.com/badboy/iso8601
Last synced: about 1 year ago
JSON representation
Parsing ISO8601 dates using nom
- Host: GitHub
- URL: https://github.com/badboy/iso8601
- Owner: badboy
- License: mit
- Created: 2015-06-29T21:59:52.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2025-02-03T10:07:28.000Z (over 1 year ago)
- Last Synced: 2025-05-10T23:32:09.952Z (about 1 year ago)
- Language: Rust
- Homepage: https://docs.rs/iso8601/
- Size: 5.8 MB
- Stars: 75
- Watchers: 3
- Forks: 24
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# omnomnom - ~~Eating~~ Parsing [ISO8601][iso] dates using [nom][]
[](https://crates.io/crates/iso8601)
[](https://docs.rs/iso8601)
[](LICENSE)
[](https://github.com/badboy/iso8601/actions/workflows/ci.yaml)
[iso]: https://en.wikipedia.org/wiki/ISO_8601
[nom]: https://github.com/Geal/nom

```rust,ignore
let datetime = iso8601::datetime("2015-06-26T16:43:23+0200").unwrap();
// the above will give you:
DateTime {
date: Date::YMD {
year: 2015,
month: 6,
day: 26,
},
time: Time {
hour: 16,
minute: 43,
second: 23,
tz_offset_hours: 2,
tz_offset_minutes: 0,
},
};
```
Still rough around the edges, though it won't fail with timezone offsets of half an hour anymore.
It's also safe for kittens now.
# [Documentation][docs]
[Documentation][docs] is online.
# License
MIT Licensed. See [LICENSE]()
[docs]: https://docs.rs/iso8601/