Skip to content

Commit

Permalink
Add prep in rule 'end of month' and 'prochain' in '(mois|jour) procha…
Browse files Browse the repository at this point in the history
…in'.
  • Loading branch information
JohannaSimoens committed Aug 5, 2019
1 parent 5d80c07 commit d39e86b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grammar/fr/src/rules_datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub fn rules_datetime(b: &mut RuleSetBuilder<Dimension>) -> RustlingResult<()> {
|_| helpers::cycle_nth(Grain::Day, -1)
);
b.rule_1_terminal("fin du mois",
b.reg(r#"(?:(?:(?:[aà] )?la|en)? )?fin (?:du|de) mois"#)?,
b.reg(r#"(?:(?:(?:[aà] |pour )?la|en)? )?fin (?:du|de) mois"#)?,
|_| {
let month = helpers::cycle_nth(Grain::Month, 1)?;
Ok(helpers::cycle_nth_after(Grain::Day, -10, &month)?
Expand Down Expand Up @@ -222,7 +222,7 @@ pub fn rules_datetime(b: &mut RuleSetBuilder<Dimension>) -> RustlingResult<()> {
);
b.rule_2("<named-month|named-day> suivant|d'après",
datetime_check!(),
b.reg(r#"suivante?s?|d'apr[eéè]s"#)?,
b.reg(r#"suivante?s?|d'apr[eéè]s|prochain"#)?,
|datetime, _| datetime.value().the_nth(1)
);
b.rule_2("<named-month|named-day> dernier|passé",
Expand Down

0 comments on commit d39e86b

Please sign in to comment.