mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-10-05 01:09:25 +00:00
Enhance documentation with usage examples for date generation utilities
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
//! Generation and manipulation of calendar date sequences.
|
||||
//!
|
||||
//! ```
|
||||
//! use rustframe::utils::dateutils::dates::{DateFreq, DatesList};
|
||||
//! let list = DatesList::new("2024-01-01".into(), "2024-01-03".into(), DateFreq::Daily);
|
||||
//! assert_eq!(list.count().unwrap(), 3);
|
||||
//! ```
|
||||
use chrono::{Datelike, Duration, NaiveDate, Weekday};
|
||||
use std::collections::HashMap;
|
||||
use std::error::Error;
|
||||
|
@@ -1,3 +1,13 @@
|
||||
//! Generators for sequences of calendar and business dates.
|
||||
//!
|
||||
//! See [`dates`] for all-day calendars and [`bdates`] for business-day aware
|
||||
//! variants.
|
||||
//!
|
||||
//! ```
|
||||
//! use rustframe::utils::dateutils::{DatesList, DateFreq};
|
||||
//! let list = DatesList::new("2024-01-01".into(), "2024-01-02".into(), DateFreq::Daily);
|
||||
//! assert_eq!(list.count().unwrap(), 2);
|
||||
//! ```
|
||||
pub mod bdates;
|
||||
pub mod dates;
|
||||
|
||||
|
Reference in New Issue
Block a user