diff --git a/backend/src/translation.rs b/backend/src/translation.rs index 7d330e3..ce7c6ba 100644 --- a/backend/src/translation.rs +++ b/backend/src/translation.rs @@ -207,8 +207,11 @@ impl Tr { format!("{}-{}", self.lang.code, self.lang.territory) } + // Return the first day of the week for the current language. + // See https://en.wikipedia.org/wiki/Week#First_day_of_the_week. pub fn first_day_of_week(&self) -> Weekday { match (self.lang.code.as_ref(), self.lang.territory.as_ref()) { + // TODO: Add more languages: https://en.wikipedia.org/wiki/Week. ("en", "US") => Weekday::Sun, _ => Weekday::Mon, }