使用Joda-Time进行语言环境的一周开始 [英] Start of week for locale using Joda-Time

查看:126
本文介绍了使用Joda-Time进行语言环境的一周开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据给定的语言环境,使用 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?!

维基百科 Seven -day week #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进行语言环境的一周开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆