sac13 0.1.1

The reference implementation for the SAC13 calendar system.
Documentation

SAC13 is a 13-month solar calendar with fixed four-week months, starting each year with the March Equinox.

This library is the Rust reference implementation for SAC13 and maintains data types and functions to convert, among others, from and to

Quick start

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.