| Crates.io | date_iter |
| lib.rs | date_iter |
| version | 0.1.1 |
| created_at | 2020-12-09 04:34:17.806133+00 |
| updated_at | 2020-12-09 05:12:54.21656+00 |
| description | Simple date iterator |
| homepage | https://github.com/joshadkins09/date_iter |
| repository | https://github.com/joshadkins09/date_iter |
| max_upload_size | |
| id | 321003 |
| size | 4,594 |
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.
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);
}