| 1 | //! Rust library for reading the text files comprising the [zoneinfo |
| 2 | //! database][w], which records time zone changes and offsets across the world |
| 3 | //! from multiple sources. |
| 4 | //! |
| 5 | //! The zoneinfo database is distributed in one of two formats: a raw text |
| 6 | //! format with one file per continent, and a compiled binary format with one |
| 7 | //! file per time zone. This crate deals with the former; for the latter, see |
| 8 | //! the [`zoneinfo_compiled` crate][zc] instead. |
| 9 | //! |
| 10 | //! The database itself is maintained by IANA. For more information, see |
| 11 | //! [IANA’s page on the time zone database][iana]. You can also find the text |
| 12 | //! files themselves in [the tz repository][tz]. |
| 13 | //! |
| 14 | //! [iana]: https://www.iana.org/time-zones |
| 15 | //! [tz]: https://github.com/eggert/tz |
| 16 | //! [w]: https://en.wikipedia.org/wiki/Tz_database |
| 17 | //! [zc]: https://github.com/rust-datetime/zoneinfo-compiled |
| 18 | //! |
| 19 | //! ## Outline |
| 20 | //! |
| 21 | //! Reading a zoneinfo text file is split into three stages: |
| 22 | //! |
| 23 | //! - **Parsing** individual lines of text into `Lines` is done by the `line` |
| 24 | //! module; |
| 25 | //! - **Interpreting** these lines into a complete `Table` is done by the |
| 26 | //! `table` module; |
| 27 | //! - **Calculating transitions** from this table is done by the `transitions` |
| 28 | //! module. |
| 29 | |
| 30 | #![warn (missing_copy_implementations)] |
| 31 | //#![warn(missing_docs)] |
| 32 | #![warn (nonstandard_style)] |
| 33 | #![warn (trivial_numeric_casts)] |
| 34 | #![warn (unreachable_pub)] |
| 35 | #![warn (unused)] |
| 36 | |
| 37 | pub mod line; |
| 38 | pub mod structure; |
| 39 | pub mod table; |
| 40 | pub mod transitions; |
| 41 | |