republican-calendar 0.1.0

A Rust library for the French Republican Calendar
Documentation
  • Coverage
  • 99.75%
    407 out of 408 items documented1 out of 9 items with examples
  • Size
  • Source code size: 106.9 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.85 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 31s Average build duration of successful builds.
  • all releases: 31s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • aarkegz

Republican Calendar

GitHub License Crates.io Version docs.rs

A Rust library for the French Republican Calendar.

Features

  • Bi-directional conversion between Gregorian and Republican calendar dates.
  • Full name and formatting support for Republican dates and months.
  • No std dependency (only relies on chrono for date calculations).

Usage

use republican_calendar::date::Date;

fn main() {
    // Get today's date in Republican calendar
    let today = chrono::Local::now().date_naive();
    let rc_today = Date::from_gregorian(today);
    println!("Today is {}", rc_today);
    
    // Create a Republican calendar date
    let date = Date::try_from_ymd(1, 1, 1).unwrap(); // 1 Vendémiaire Year 1
    let gregorian = date.to_gregorian(); // Convert to Gregorian
}

About the Calendar

The French Republican Calendar uses a new era beginning on September 22, 1792. Each year consists of twelve 30-day months plus 5-6 complementary days called Sans-culottides. Each month and day has a unique name, about which you can read more here.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Development Status

This project is under development. The API may change. Contributions welcome!