year-helper 0.2.1

This library provides some useful functions to deal with years.
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented1 out of 6 items with examples
  • Size
  • Source code size: 5.37 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 595.75 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • magiclen/year-helper
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • magiclen

Year Helper

CI

This library provides some useful functions to deal with years.

Usage

let year = 2020;
let month = 2;

let leap_year = year_helper::is_leap_year(year);

let days_in_month = year_helper::get_days_in_month(year, month);
let days_in_year = year_helper::get_days_in_year(year);

// or use the following functions if the year has been determined whether it is a leap year
let days_in_month = year_helper::get_days_in_month_2(leap_year, month);
let days_in_year = year_helper::get_days_in_year_2(leap_year);

Crates.io

https://crates.io/crates/year-helper

Documentation

https://docs.rs/year-helper

License

MIT