date_iter

Crates.iodate_iter
lib.rsdate_iter
version0.1.1
sourcesrc
created_at2020-12-09 04:34:17.806133
updated_at2020-12-09 05:12:54.21656
descriptionSimple date iterator
homepagehttps://github.com/joshadkins09/date_iter
repositoryhttps://github.com/joshadkins09/date_iter
max_upload_size
id321003
size4,594
(joshadkins09)

documentation

README

date_iter: a simple date iterator

Overview

This provides an incredibly simple way to iterate over calendar date ranges. Although it's easy few lines to add in place as needed, it can be preferable to have a reliable standalone module for such functionality when used frequently. The heavy lifting under the hood is handled by the legendary chrono library.

Basically, provided the start/stop bounds of a date range, iterate from start to end, both inclusive.

Usage

    use date_iter::{Date, date_iter};
    for date in date_iter(Date::from_ymd(2020, 12, 4), Date::from_ymd(2020, 12, 8)) {
        println!("{}", date);
    }
Commit count: 8

cargo fmt