| Crates.io | jayver |
| lib.rs | jayver |
| version | 1.0.0 |
| created_at | 2025-05-18 21:06:52.431604+00 |
| updated_at | 2025-05-18 21:06:52.431604+00 |
| description | A calendar versioning scheme for binaries developed by Emmett Jayhart |
| homepage | |
| repository | https://github.com/EmmettJayhart/jayver |
| max_upload_size | |
| id | 1678919 |
| size | 108,255 |
A calendar versioning scheme for binaries developed by Emmett Jayhart, built upon ISO 8601 week dates and CalVer.
JayVer follows the format: YY.WW.PATCH
25 for 2025)1-53)0use jayver::{Version, VersionReq};
// Parse a version
let version = Version::parse("25.16.3").unwrap();
assert_eq!(version.year, 25); // Year 2025 (25 + 2000)
assert_eq!(version.week, 16);
assert_eq!(version.patch, 3);
// Create a version for today
let today = Version::today();
println!("Today's version: {today}");
// Compare versions
let v1 = Version::parse("25.10.0").unwrap();
let v2 = Version::parse("25.11.0").unwrap();
assert!(v1 < v2);
// Check version requirements
let req = VersionReq::parse(">=25.10.0").unwrap();
assert!(req.matches(&v1));
// Compatible version requirements
let req = VersionReq::parse("~>25.16.0").unwrap();
let v = Version::parse("25.16.5").unwrap();
assert!(req.matches(&v)); // Same week, any patch
Add JayVer to your Cargo.toml:
[dependencies]
jayver = "1.0"
# Optional: Enable serde support
jayver = { version = "1.0", features = ["serialization"] }
See CHANGELOG.md for more information.
VersionReq and AnyVersionReq types for version matching and constraintsserialization feature flagtoday(), increment_patch(), next_week()same_week() method for comparing versions from the same weekis_valid() and parse()short_year() and full_year() conversion utilities for year format handlingnom parsers for year, week, year_week, patch, and versionFromStr implementation for easy string parsingDisplay implementation for string conversionThis crate requires Rust 1.67.1 or later.
time)criterion for running benchmarks)The minimum supported Rust version may be bumped in minor releases.
Copyright 2025 Emmett Jayhart
Licensed under either of
at your option.
Feel free to submit an issue and/or a pull request.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.