pub enum CalendarInterval {
Minute,
Hour,
Day,
Week,
Month,
Quarter,
Year,
}
Expand description
Calendar-aware intervals are configured with the calendar_interval
parameter. You can specify
calendar intervals using the unit name, such as month
, or as a single unit quantity, such as
1M
. For example,day
and 1d
are equivalent. Multiple quantities, such as 2d
, are not supported.
Variants§
Minute
All minutes begin at 00 seconds. One minute is the interval between 00 seconds of the first minute and 00 seconds of the following minute in the specified time zone, compensating for any intervening leap seconds, so that the number of minutes and seconds past the hour is the same at the start and end.
Hour
All hours begin at 00 minutes and 00 seconds. One hour (1h) is the interval between 00:00 minutes of the first hour and 00:00 minutes of the following hour in the specified time zone, compensating for any intervening leap seconds, so that the number of minutes and seconds past the hour is the same at the start and end.
Day
All days begin at the earliest possible time, which is usually 00:00:00 (midnight). One day (1d) is the interval between the start of the day and the start of the following day in the specified time zone, compensating for any intervening time changes.
Week
One week is the interval between the start day_of_week:hour:minute:second and the same day of the week and time of the following week in the specified time zone.
Month
One month is the interval between the start day of the month and time of day and the same day of the month and time of the following month in the specified time zone, so that the day of the month and time of day are the same at the start and end.
Quarter
One quarter is the interval between the start day of the month and time of day and the same day of the month and time of day three months later, so that the day of the month and time of day are the same at the start and end.
Year
One year is the interval between the start day of the month and time of day and the same day of the month and time of day the following year in the specified time zone, so that the date and time are the same at the start and end.
Trait Implementations§
Source§impl Clone for CalendarInterval
impl Clone for CalendarInterval
Source§fn clone(&self) -> CalendarInterval
fn clone(&self) -> CalendarInterval
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more