pub struct Config { /* private fields */ }
Expand description
A collection of parameters that can influence the interpretation of time expressions.
Implementations
sourceimpl Config
impl Config
sourcepub fn now(&self, n: DateTime<Utc>) -> Config
pub fn now(&self, n: DateTime<Utc>) -> Config
Returns a copy of the configuration parameters with the “now” moment set to the parameter supplied.
sourcepub fn monday_starts_week(&self, monday_starts_week: bool) -> Config
pub fn monday_starts_week(&self, monday_starts_week: bool) -> Config
Returns a copy of the configuration parameters with whether
Monday is regarded as the first day of the week set to the parameter
supplied. By default Monday is regarded as the first day. If this
parameter is set to false
, Sunday will be regarded as the first weekday.
sourcepub fn pay_period_length(&self, pay_period_length: u32) -> Config
pub fn pay_period_length(&self, pay_period_length: u32) -> Config
Returns a copy of the configuration parameters with the pay period length in days set to the parameter supplied. The default pay period length is 7 days.
sourcepub fn pay_period_start(&self, pay_period_start: Option<Date<Utc>>) -> Config
pub fn pay_period_start(&self, pay_period_start: Option<Date<Utc>>) -> Config
Returns a copy of the configuration parameters with the reference start date for a pay period set to the parameter supplied. By default this date is undefined. Unless it is defined, expressions containing the phrase “pay period” or “pp” cannot be interpreted.