quarterly

Crates.ioquarterly
lib.rsquarterly
version0.1.1
sourcesrc
created_at2023-12-20 12:42:22.467527
updated_at2023-12-20 12:53:27.483904
descriptionRust crate containing types for handling calendar quarters.
homepage
repositoryhttps://github.com/maxveldink/quarterly.git
max_upload_size
id1075249
size25,291
Max VelDink (maxveldink)

documentation

README

Quarterly

A simple Rust crate containing types for handling calendar quarters.

Usage

use quarterly::*;

/// Basics
let quarter = Quarter::new(QuarterNumber::Q4, 2023)
quarter.next_quarter() /// => Quarter::new(QuarterNumber::Q1, 2024)

/// String parsing
let quarter: Quarter = "Q2 2023".parse::().unwrap();
let quarter: Quarter = "q3 1994".parse::().unwrap();

Development

Clone the repo, and then run the standard cargo commands to verify the project.

cargo clippy; cargo fmt; cargo test

Commit count: 4

cargo fmt