diff --git a/rrule/src/core/rrule.rs b/rrule/src/core/rrule.rs index b3fadde..3ea9838 100644 --- a/rrule/src/core/rrule.rs +++ b/rrule/src/core/rrule.rs @@ -656,7 +656,7 @@ impl Display for RRule { // Monday is the default, no need to expose it. if self.week_start != Weekday::Mon { - res.push(format!("WKST={}", &self.week_start)); + res.push(format!("WKST={}", weekday_to_str(self.week_start))); } if !self.by_set_pos.is_empty() { diff --git a/rrule/src/tests/regression.rs b/rrule/src/tests/regression.rs index debfbc2..1342045 100644 --- a/rrule/src/tests/regression.rs +++ b/rrule/src/tests/regression.rs @@ -1,7 +1,7 @@ use chrono::Month; use crate::tests::common; -use crate::{Frequency, RRule, RRuleSet}; +use crate::{Frequency, RRule, RRuleSet, Unvalidated}; #[test] fn issue_34() { @@ -60,3 +60,13 @@ fn issue_97() { "FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=24,25,26" ); } + +#[test] +fn issue_111() { + let rrule = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU;WKST=SU" + .parse::>(); + + // Convert to string... + let rrule_str = format!("{}", rrule.unwrap()); + assert!(rrule_str.contains("WKST=SU")); +} \ No newline at end of file