公历日历的最大值和最小值是多少?
What are the maximum and minimum values of a GregorianCalendar?
它们是像 Integer.MAX_VALUE 这样的常量,还是 GregorianCalendar.get(BLAH)?
Are they in a constant like Integer.MAX_VALUE, or maybe GregorianCalendar.get(BLAH)?
简而言之,如何创建具有最小值/最大值的 GregorianCalendar 实例?
In a nutshell, how can I create a GregorianCalendar instance with min/max value?
这应该可行:
GregorianCalendar maxgc = new GregorianCalendar();
maxgc.setTime(new Date(Long.MAX_VALUE));
GregorianCalendar mingc = new GregorianCalendar();
mingc.setTime(new Date(Long.MIN_VALUE));
这篇关于Java:GregorianCalendar 的最大值和最小值是什么/在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!