Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Days

A duration in calendar days.

This is useful because when using TimeDelta it is possible that adding TimeDelta::days(1) doesn’t increment the day value as expected due to it being a fixed number of seconds. This difference applies only when dealing with DateTime<TimeZone> data types and in other cases TimeDelta::days(n) and Days::new(n) are equivalent.

Fully qualified path: chrono::days::Days

[derive(Clone, Copy, PartialEq, Drop, Debug)]
pub struct Days { /* private fields */ }