pub fn new(from: Date, to: Date) -> Self {
        if from < to {
            Self { from, to }
        } else {
            Self { from: to, to: from }
        }
    }
// region: constructors
/// Creates a new `DateRange` object.
/// Reorders the arguments to ensure the from part is always the start of the
/// timeline, i.e. the earliest date
constructors
Creates a new `DateRange` object.
Reorders the arguments to ensure the from part is always the start of the
timeline, i.e. the earliest date
constructors Creates a new ` DateRange ` object . Reorders the arguments to ensure the from part is always the start of the timeline i . e . the earliest date
pub fn new(from: Date, to: Date) -> Self {
        if from < to {
            Self { from, to }
        } else {
            Self { from: to, to: from }
        }
    }
pub fn new ( from : Date , to : Date ) -> Self { if from < to { Self { from , to } } else { Self { from : to , to : from } } }
region: constructors
Creates a new `DateRange` object.
region : constructors Creates a new ` DateRange ` object .
from
Date
to
Date
from
Date
to
Date