JayVer
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
- YY: ISO week-numbering year minus 2000 (e.g.,
25for 2025) - WW: ISO 8601 week number (
1-53) - PATCH: Incremental number for patches within same week, starting at
0
Features
- Version requirements with comparison operators
- ISO 8601 week date validation
- Optional serialization support via serde
Usage
use ;
// Parse a version
let version = parse.unwrap;
assert_eq!; // Year 2025 (25 + 2000)
assert_eq!;
assert_eq!;
// Create a version for today
let today = today;
println!;
// Compare versions
let v1 = parse.unwrap;
let v2 = parse.unwrap;
assert!;
// Check version requirements
let req = parse.unwrap;
assert!;
// Compatible version requirements
let req = parse.unwrap;
let v = parse.unwrap;
assert!; // Same week, any patch
Installation
Add JayVer to your Cargo.toml:
[]
= "1.0"
# Optional: Enable serde support
= { = "1.0", = ["serialization"] }
Changelog
See CHANGELOG.md for more information.
[1.0.0] - 2025-05-18
Added
- Calendar versioning scheme with YY.WW.PATCH format ISO week-numbering year minus 2000)
- Version requirements system with comparison operators
VersionReqandAnyVersionReqtypes for version matching and constraints- Optional serde serialization support via
serializationfeature flag - Utility methods:
today(),increment_patch(),next_week() same_week()method for comparing versions from the same week- Top-level convenience functions
is_valid()andparse() short_year()andfull_year()conversion utilities for year format handling- Comprehensive test suite including property-based tests and benchmarks
- Examples demonstrating various use cases
nomparsers foryear,week,year_week,patch, andversion- Chronological comparisons and sorting
FromStrimplementation for easy string parsingDisplayimplementation for string conversion
Minimum Supported Rust Version
This crate requires Rust 1.67.1 or later.
- Library MSRV: 1.67.1 (required by
time) - Development MSRV: 1.80 (required by
criterionfor running benchmarks)
The minimum supported Rust version may be bumped in minor releases.
License
Copyright 2025 Emmett Jayhart
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE.txt or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT.txt or http://opensource.org/licenses/MIT)
at your option.
Contribution
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.