Java是否支持Julian日历?

Oracle docs http://docs.oracle.com/javase/6/docs/technotes/guides/intl/calendar.doc.html声称Java支持3个日历系统:Gregorian,Japanese Imperial和Thai Buddhist. Java是否支持Julian日历?

解决方法

是的,它确实.

来自GregorianCalendar的文档:

GregorianCalendar is a hybrid calendar that supports both the Julian
and Gregorian calendar systems with the support of a single
discontinuity,which corresponds by default to the Gregorian date when
the Gregorian calendar was instituted (October 15,1582 in some
countries,later in others). The cutover date may be changed by the
caller by calling setGregorianChange().

使用setGregorianChange更改它.

public void setGregorianChange(Date date) Sets the GregorianCalendar change date. This is the point when the switch from Julian dates to Gregorian dates occurred. Default is October 15,1582 (Gregorian). PrevIoUs to this,dates will be in the Julian calendar. To obtain a pure Julian calendar,set the change date to Date(Long.MAX_VALUE). To obtain a pure Gregorian calendar,set the change date to Date(Long.MIN_VALUE).

相关文章

最近看了一下学习资料,感觉进制转换其实还是挺有意思的,尤...
/*HashSet 基本操作 * --set:元素是无序的,存入和取出顺序不...
/*list 基本操作 * * List a=new List(); * 增 * a.add(inde...
/* * 内部类 * */ 1 class OutClass{ 2 //定义外部类的成员变...
集合的操作Iterator、Collection、Set和HashSet关系Iterator...
接口中常量的修饰关键字:public,static,final(常量)函数...