Crates.io | quarterly |
lib.rs | quarterly |
version | 0.1.1 |
source | src |
created_at | 2023-12-20 12:42:22.467527 |
updated_at | 2023-12-20 12:53:27.483904 |
description | Rust crate containing types for handling calendar quarters. |
homepage | |
repository | https://github.com/maxveldink/quarterly.git |
max_upload_size | |
id | 1075249 |
size | 25,291 |
A simple Rust crate containing types for handling calendar quarters.
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();
Clone the repo, and then run the standard cargo commands to verify the project.
cargo clippy; cargo fmt; cargo test