問題描述
如何根據給定的 區域設置 使用 Joda-Time?
How do you determine which day of the week is considered the "start" according to a given Locale using Joda-Time?
要點:大多數國家/地區使用國際標準星期一作為一周的第一天 (!).其他人使用星期日(尤其是美國).其他人顯然是星期六.有些顯然是星期三?!
Point: Most countries use the international standard Monday as first day of week (!). A bunch others use Sunday (notably USA). Others apparently Saturday. Some apparently Wednesday?!
維基百科每周七天"#Week_number
推薦答案
Joda-Time 周一至周日使用 ISO 標準.
Joda-Time uses the ISO standard Monday to Sunday week.
它沒有能力獲取星期的第一天,也沒有能力返回基于標準星期一以外的任何一天的星期索引.最后,周數總是按照 ISO 規則計算的.
It does not have the ability to obtain the first day of week, nor to return the day of week index based on any day other than the standard Monday. Finally, weeks are always calculated wrt ISO rules.
這篇關于使用 Joda-Time 的語言環境的一周開始的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!