republican-calendar

Crates.iorepublican-calendar
lib.rsrepublican-calendar
version0.1.0
created_at2025-09-22 13:45:09.570303+00
updated_at2025-09-22 13:45:09.570303+00
descriptionA Rust library for the French Republican Calendar
homepage
repository
max_upload_size
id1850059
size107,406
Su Mingxian (aarkegz)

documentation

README

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!

Commit count: 0

cargo fmt