SAC13 is a 13-month solar calendar with fixed four-week months,
starting each year with the March Equinox.
<a href="https://sac13.net"><img alt="Static Badge" src="https://img.shields.io/badge/web-SAC13-yellow"></a>
<a href="https://codeberg.org/SAC13/sac13.rs"><img alt="Repository link icon" src="https://img.shields.io/badge/repo-sac13.rs-blue"></a>
<a href="https://crates.io/crates/sac13"><img alt="Crates.io Version" src="https://img.shields.io/crates/v/sac13"></a>
<a href="https://docs.rs/sac13"><img alt="docs.rs" src="https://img.shields.io/docsrs/sac13"></a>
<a href="https://codeberg.org/SAC13/sac13.rs/src/branch/main/LICENSE"><img alt="Crates.io License" src="https://img.shields.io/crates/l/sac13"></a>
This library is the Rust reference implementation for SAC13 and maintains data types and functions
to convert, among others, from and to
- [Gregorian Calendar dates](https://docs.rs/sac13/latest/sac13/struct.GregorianDate.html)
- [JulianDays](https://docs.rs/sac13/latest/sac13/day_counts/struct.JulianDay.html)
- [UnixDays](https://docs.rs/sac13/latest/sac13/day_counts/struct.UnixDay.html)
## Quick start
```rust
use sac13::prelude::*;
pub fn main() {
// Convert a Gregorian Calendar date to SAC13:
let greg_date = date_greg!(2021 - 04 - 05);
let jdn = greg_date.as_julian();
let sac13_date = Date::from_julian(jdn).unwrap();
println!("{greg_date} -> {sac13_date}");
// Convert SAC13 to Gregorian Calendar:
let sac13_date = date!(M024 - 07 - 12);
let jdn = sac13_date.as_julian();
let greg_date = GregorianDate::from_julian(jdn).unwrap();
println!("{sac13_date} -> {greg_date}");
}
```
## Breaking Changes
Note, this library is pretty new so there will probably be a hand full of major version bumps (and breaking changes) until we hit 1.0.