diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2328751..921d95f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -189,21 +189,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - package: - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Setup Rust - uses: ./.github/actions/setup-rust - with: - toolchain: stable - - - run: cargo package --workspace - devskim: name: DevSkim runs-on: ubuntu-20.04 diff --git a/Cargo.toml b/Cargo.toml index b986860..04f575b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tzdb" -version = "0.6.1-pre.1" +version = "0.6.1" edition = "2018" authors = ["René Kijewski "] repository = "https://github.com/Kijewski/tzdb" @@ -13,7 +13,7 @@ readme = "README.md" [dependencies] iana-time-zone = { version = "^0.1.50", default-features = false, features = ["fallback"], optional = true } -tzdb_data = { version = "0.1.0-pre.1", default-features = false, path = "tzdb_data" } +tzdb_data = { version = "^0.1.0", default-features = false, path = "tzdb_data" } tz-rs = { version = "^0.6.14", default-features = false, features = ["const", "std"] } [features] diff --git a/README.md b/README.md index 93111b9..e363047 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,13 @@ # tzdb — Time Zone Database -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Kijewski/tzdb/ci.yml?branch=v0.6.x)](https://github.com/Kijewski/tzdb/actions/workflows/ci.yml) -[![Crates.io](https://img.shields.io/crates/v/tzdb?logo=rust)](https://crates.io/crates/tzdb) -![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.56+-important?logo=rust "Minimum Supported Rust Version: 1.56") -[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-informational?logo=apache)](/LICENSE.md "License: Apache-2.0") +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Kijewski/tzdb/ci.yml?branch=v0.6.x&style=for-the-badge)](https://github.com/Kijewski/tzdb/actions/workflows/ci.yml) +[![Crates.io](https://img.shields.io/crates/v/tzdb?logo=rust&style=for-the-badge)](https://crates.io/crates/tzdb) +![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.56+-important?logo=rust&style=for-the-badge "Minimum Supported Rust Version: 1.56") +[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-informational?logo=apache&style=for-the-badge)](/LICENSE.md "License: Apache-2.0") Static time zone information for [tz-rs](https://crates.io/crates/tz-rs). -This crate provides all time zones found in the [Time Zone Database](https://www.iana.org/time-zones), -currently in the version 2023d (released 2023-12-22). - -See the documentation for a full list the the contained time zones: - +This crate provides all time zones found in the [Time Zone Database](https://www.iana.org/time-zones). ## Usage examples @@ -29,7 +25,7 @@ let current_time = tzdb::now::in_named("Europe/Berlin")?; // names are case insensitive let time_zone = tzdb::tz_by_name("ArCtIc/LongYeArByEn")?; -let current_time = tzdb::now::in_named("ArCtIc/LongYeArByEn")?; +let current_time = tzdb::now::in_named("ArCtIc/LoNgYeArByEn")?; // provide a default time zone let current_time = tzdb::now::local_or(tzdb::time_zone::GMT)?; diff --git a/src/lib.rs b/src/lib.rs index bf3e81b..3027551 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,20 +33,16 @@ #![warn(unused_lifetimes)] #![warn(unused_results)] -//! # tzdb — Time Zone Database +//! # `tzdb` — Time Zone Database //! -//! [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Kijewski/tzdb/ci.yml?branch=v0.6.x)](https://github.com/Kijewski/tzdb/actions/workflows/ci.yml) -//! [![Crates.io](https://img.shields.io/crates/v/tzdb?logo=rust)](https://crates.io/crates/tzdb) -//! ![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.56+-important?logo=rust "Minimum Supported Rust Version: 1.56") -//! [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-informational?logo=apache)](/LICENSE.md "License: Apache-2.0") +//! [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Kijewski/tzdb/ci.yml?branch=v0.6.x&style=for-the-badge)](https://github.com/Kijewski/tzdb/actions/workflows/ci.yml) +//! [![Crates.io](https://img.shields.io/crates/v/tzdb?logo=rust&style=for-the-badge)](https://crates.io/crates/tzdb) +//! ![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.56+-important?logo=rust&style=for-the-badge "Minimum Supported Rust Version: 1.56") +//! [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-informational?logo=apache&style=for-the-badge)](/LICENSE.md "License: Apache-2.0") //! //! Static time zone information for [tz-rs](https://crates.io/crates/tz-rs). //! -//! This crate provides all time zones found in the [Time Zone Database](https://www.iana.org/time-zones), -//! currently in the version 2023d (released 2023-12-22). -//! -//! See the documentation for a full list the the contained time zones: -//! +//! This crate provides all time zones found in the [Time Zone Database](https://www.iana.org/time-zones). //! //! ## Usage examples //! @@ -66,8 +62,8 @@ //! let current_time = tzdb::now::in_named("Europe/Berlin").unwrap(); //! //! // names are case insensitive -//! let time_zone = tzdb::tz_by_name("ArCtIc/LongYeArByEn").unwrap(); -//! let current_time = tzdb::now::in_named("ArCtIc/LongYeArByEn").unwrap(); +//! let time_zone = tzdb::tz_by_name("ArCtIc/LoNgYeArByEn").unwrap(); +//! let current_time = tzdb::now::in_named("ArCtIc/LoNgYeArByEn").unwrap(); //! //! // provide a default time zone //! # #[cfg(feature = "local")] { @@ -81,9 +77,6 @@ //! * `local` (enabled by default) — enable functions to query the current system time //! -#[cfg(docsrs)] -extern crate alloc; - #[cfg(docsrs)] pub mod changelog; pub mod now; diff --git a/tzdb_data/Cargo.toml b/tzdb_data/Cargo.toml index 5cb796d..752015b 100644 --- a/tzdb_data/Cargo.toml +++ b/tzdb_data/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tzdb_data" -version = "0.1.0-pre.1" +version = "0.1.0" edition = "2018" authors = ["René Kijewski "] repository = "https://github.com/Kijewski/tzdb" diff --git a/tzdb_data/README.md b/tzdb_data/README.md index 637af25..d37da85 100644 --- a/tzdb_data/README.md +++ b/tzdb_data/README.md @@ -1 +1,19 @@ +# tzdb_data — Time Zone Database + +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Kijewski/tzdb/ci.yml?branch=v0.6.x&style=for-the-badge)](https://github.com/Kijewski/tzdb/actions/workflows/ci.yml) +[![Crates.io](https://img.shields.io/crates/v/tzdb?logo=rust&style=for-the-badge)](https://crates.io/crates/tzdb) +![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.56+-important?logo=rust&style=for-the-badge "Minimum Supported Rust Version: 1.56") +[![License: MIT-0](https://img.shields.io/badge/license-MIT--0-informational?logo=apache&style=for-the-badge)](/LICENSE.md "License: MIT-0") + Static, `#![no_std]` time zone information for tz-rs + +## Usage examples + +```rust +// access by identifier +let time_zone = tzdb_data::time_zone::europe::KYIV; +// access by name +let time_zone = tzdb_data::find_tz(b"Europe/Berlin").unwrap(); +// names are case insensitive +let time_zone = tzdb_data::find_tz(b"ArCtIc/LoNgYeArByEn").unwrap(); +``` diff --git a/tzdb_data/src/lib.rs b/tzdb_data/src/lib.rs index 21d6524..72448fb 100644 --- a/tzdb_data/src/lib.rs +++ b/tzdb_data/src/lib.rs @@ -24,15 +24,35 @@ #![allow(clippy::type_complexity)] #![no_std] +//! # `tzdb_data` — Time Zone Database +//! +//! [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Kijewski/tzdb/ci.yml?branch=v0.6.x&style=for-the-badge)](https://github.com/Kijewski/tzdb/actions/workflows/ci.yml) +//! [![Crates.io](https://img.shields.io/crates/v/tzdb?logo=rust&style=for-the-badge)](https://crates.io/crates/tzdb) +//! ![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.56+-important?logo=rust&style=for-the-badge "Minimum Supported Rust Version: 1.56") +//! [![License: MIT-0](https://img.shields.io/badge/license-MIT--0-informational?logo=apache&style=for-the-badge)](/LICENSE.md "License: MIT-0") +//! //! Static, `#![no_std]` time zone information for tz-rs //! +//! This crate provides all time zones found in the [Time Zone Database](https://www.iana.org/time-zones). +//! +//! ## Usage examples +//! +//! ```rust +//! // access by identifier +//! let time_zone = tzdb_data::time_zone::europe::KYIV; +//! // access by name +//! let time_zone = tzdb_data::find_tz(b"Europe/Berlin").unwrap(); +//! // names are case insensitive +//! let time_zone = tzdb_data::find_tz(b"ArCtIc/LoNgYeArByEn").unwrap(); +//! ``` +//! mod generated; #[cfg_attr(docsrs, doc(inline))] pub use crate::generated::{time_zone, TZ_NAMES, VERSION, VERSION_HASH}; -/// Find a time zone by name, e.g. `"Europe/Berlin"` (case-insensitive) +/// Find a time zone by name, e.g. `b"Europe/Berlin"` (case-insensitive) /// /// # Example /// @@ -51,7 +71,7 @@ pub const fn find_tz(s: &[u8]) -> Option<&'static tz::TimeZoneRef<'static>> { } } -/// Find the raw, unparsed time zone data by name, e.g. `"Europe/Berlin"` (case-insensitive) +/// Find the raw, unparsed time zone data by name, e.g. `b"Europe/Berlin"` (case-insensitive) /// /// # Example ///