12 releases (6 breaking)

0.6.1 Feb 12, 2023
0.5.1 Nov 9, 2022
0.5.0 Jul 29, 2022
0.4.1 Nov 21, 2021
0.1.1 Nov 16, 2015

#6 in Date and time

Download history 175749/week @ 2024-07-04 219213/week @ 2024-07-11 156240/week @ 2024-07-18 164107/week @ 2024-07-25 150895/week @ 2024-08-01 266799/week @ 2024-08-08 192339/week @ 2024-08-15 174643/week @ 2024-08-22 169405/week @ 2024-08-29 281367/week @ 2024-09-05 207821/week @ 2024-09-12 207723/week @ 2024-09-19 205267/week @ 2024-09-26 229660/week @ 2024-10-03 211798/week @ 2024-10-10 367681/week @ 2024-10-17

1,062,036 downloads per month
Used in 202 crates (25 directly)

MIT license

54KB
1.5K SLoC

omnomnom - Eating Parsing ISO8601 dates using nom

crates.io docs.rs docs License: MIT Build status

omnomnom

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

Documentation is online.

License

MIT Licensed. See LICENSE

Dependencies

~0.8–1.5MB
~27K SLoC