crab_era 0.1.0

Computes time relative to the Crab Epoch (the commit of Rust 1.0, a59de37e)
Documentation
  • Coverage
  • 33.33%
    1 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 40.47 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.22 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ReactorScram/crab_era
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ReactorScram

crab_era computes time relative to the Crab Epoch (the commit of Rust 1.0, a59de37e).

Example:

use chrono::{
	DateTime,
	Utc,
};

use crab_era::{
	crab,
	to_crab,
};

let t_3339 = "2022-04-14T23:41:20+00:00";
let ndt = DateTime::parse_from_rfc3339 (t_3339).unwrap ().naive_utc ();

let c = to_crab (ndt);
let roundtripped = crab (c).unwrap ();

assert_eq! (c, 218406860);
assert_eq! (DateTime::<Utc>::from_utc (roundtripped, Utc).to_rfc3339 (), t_3339);

Made by 🦀 with 🦀 for 🦀 to 🦀