Add doc
This commit is contained in:
parent
fdbf2e4f27
commit
475024a97b
1 changed files with 3 additions and 0 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue