use-time-zone-id 0.1.0

Small IANA time zone identifier syntax primitives for RustUse
Documentation
  • Coverage
  • 100%
    11 out of 11 items documented1 out of 11 items with examples
  • Size
  • Source code size: 7.33 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 367.59 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-locale
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-time-zone-id

Small IANA time zone identifier syntax primitives for RustUse.

Example

use use_time_zone_id::{is_time_zone_id, parse_time_zone_id};

let zone = parse_time_zone_id("America/New_York").unwrap();

assert_eq!(zone.area(), "America");
assert_eq!(zone.location(), Some("New_York"));
assert!(is_time_zone_id("UTC"));

Scope

  • Validate IANA-shaped time zone identifier syntax.
  • Support identifiers like UTC, America/New_York, and Europe/London.
  • Split valid identifiers into area and location components.

Non-goals

  • Time arithmetic.
  • Daylight-saving calculations.
  • Date/time conversion.
  • Bundled tzdb data.
  • Replacement for time, chrono, or tz-rs.

License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license