date-recurrence 0.1.0

Small date recurrence utilities for daily, weekly, monthly, and yearly schedules.
Documentation
  • Coverage
  • 96%
    24 out of 25 items documented0 out of 17 items with examples
  • Size
  • Source code size: 60.65 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 740.42 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
  • Sisyphus1813/date-recurrence
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Sisyphus1813

date-recurrence

Small date recurrence utility for chrono::NaiveDate.

Supports daily, every-N-days, weekly, monthly, semiannual, annual, and biennial schedules.

Example

use chrono::{NaiveDate, Weekday};
use date_recurrence::{DateRange, Frequency, Schedule};

let schedule = Schedule::new(
    NaiveDate::from_ymd_opt(2026, 1, 1).unwrap(),
    Frequency::Weekly(Weekday::Mon),
);

let range = DateRange::new(
    NaiveDate::from_ymd_opt(2026, 1, 1).unwrap(),
    NaiveDate::from_ymd_opt(2026, 1, 15).unwrap(),
).unwrap();

let dates = schedule.occurrences_between(range);