Joda-time:今年ISO第1周的第一天 [英] Joda-time: First day in this year's ISO week 1

查看:232
本文介绍了Joda-time:今年ISO第1周的第一天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道今年的ISO第1周的周一日期(2009年将是2008年12月29日星期一)。

I would like to find out the date of the Monday in this year's ISO week 1 (For 2009 this would be Monday, Dec 29 2008).

我'我确定 joda-time 可以解决这个问题,但我无法想象退出API(可能为时已晚)。

I'm sure that joda-time can handle this, but I just can't figure out the API (maybe it's just too late).

任何人都可以提供帮助吗?谢谢!

Can anyone help? Thanks!

推荐答案

我相信这应该有效:

DateMidnight date = new DateMidnight().withWeekOfWeekyear(1).withDayOfWeek(1);

这篇关于Joda-time:今年ISO第1周的第一天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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