Calendar.DAY_OF_MONTH

来源:互联网 发布:python getopt 详解 编辑:程序博客网 时间:2024/06/07 04:27

D:\apache-maven-3.0.2\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar里面的org.apache.commons.lang.time.DateUtils,类中的trancate(Date ,int)

中int这个用Calendar.DAY_OF_MONTH,而且他的值:5

但是如果用Calendar.DAY_OF_YEAR,就会报错:The field 6 is not supported 

如果用DAY_OF_WEEK,就会报错:The field 7 is not supported 



经常发傻,出这种错误,

原创粉丝点击