今天在使用SimpleDateFormat 时发现了以下一个bug,我期望的结果应该是2008-1,但实现却输出了2007-1.
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.SIMPLIFIED_CHINESE);
try{
Date date1 = sdf.parse("2007-12-31");
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-w", Locale.SIMPLIFIED_CHINESE);
System.out.println(sdf1.format(date1));
}catch(ParseException e){
e.printStackTrace();
}