为什么2010年12月31日返回的周数是1?

12 浏览
0 Comments

为什么2010年12月31日返回的周数是1?

例如:

Calendar c = Calendar.getInstance();
DateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
c.setTime( sdf.parse("31/12/2010"));
out.println( c.get( Calendar.WEEK_OF_YEAR ) );  

打印出1。

Joda时间的情况也是一样的。

🙂

0