From 475024a97b7f33feea372ca736b678d52549bc1d Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Sat, 19 Apr 2025 12:17:07 +0200 Subject: [PATCH] Add doc --- backend/src/translation.rs | 3 +++ 1 file changed, 3 insertions(+) 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, }