pub fn truncate_high_fields(&mut self, f: DateTimeField) {
        match f {
            DateTimeField::Year => {}
            DateTimeField::Month => self.months %= 12,
            DateTimeField::Day => self.months = 0,
            DateTimeField::Hour | DateTimeField::Minute | DateTimeField::Second => {
                self.months = 0;
                self.duration %= f.next_largest().nanos_multiplier() as i128
            }
            DateTimeField::Millennium
            | DateTimeField::Century
            | DateTimeField::Decade
            | DateTimeField::Milliseconds
            | DateTimeField::Microseconds => {
                unreachable!(format!("Cannot truncate interval by {}", f))
            }
        }
    }
/// Truncate the "head" of the interval, removing all time units greater than `f`.
Truncate the "head" of the interval, removing all time units greater than `f`.
Truncate the " head " of the interval removing all time units greater than ` f ` .
pub fn truncate_high_fields(&mut self, f: DateTimeField) {
        match f {
            DateTimeField::Year => {}
            DateTimeField::Month => self.months %= 12,
            DateTimeField::Day => self.months = 0,
            DateTimeField::Hour | DateTimeField::Minute | DateTimeField::Second => {
                self.months = 0;
                self.duration %= f.next_largest().nanos_multiplier() as i128
            }
            DateTimeField::Millennium
            | DateTimeField::Century
            | DateTimeField::Decade
            | DateTimeField::Milliseconds
            | DateTimeField::Microseconds => {
                unreachable!(format!("Cannot truncate interval by {}", f))
            }
        }
    }
pub fn truncate_high_fields ( & mut self , f : DateTimeField ) { match f { DateTimeField :: Year => { } DateTimeField :: Month => self . months %= 12 , DateTimeField :: Day => self . months = 0 , DateTimeField :: Hour | DateTimeField :: Minute | DateTimeField :: Second => { self . months = 0 ; self . duration %= f . next_largest ( ) . nanos_multiplier ( ) as i128 } DateTimeField :: Millennium | DateTimeField :: Century | DateTimeField :: Decade | DateTimeField :: Milliseconds | DateTimeField :: Microseconds => { unreachable ! ( format ( " " f ) ) } } }
Truncate the "head" of the interval, removing all time units greater than `f`.
Truncate the " head " of the interval removing all time units greater than ` f ` .
&mut self
f
DateTimeField