我正在使用ICU4J日历库在日历系统(公历、日文、中文、贾拉利、伊斯兰等)之间转换日期。
我将它与普通日期(在ERA之后)一起使用,如下所示:
Calendar gc = new GregorianCalendar();
gc.setTime(dateOBJ);是否可以在ERA日期(例如公元前500年)之前设置?
发布于 2012-09-01 01:36:35
我有它的实现,我使用了这个:
calObj = new GregorianCalendar(500,6,12,0,0,0);
calObj.set(GregorianCalendar.ERA, GregorianCalendar.BC);发布于 2012-08-29 04:05:33
是。
试一试
gc.setTime(new Date((long)((-500-1970)*(86400.0)*(365.25)*(1000.0)))); // -17104219200.00, approx 500BChttps://stackoverflow.com/questions/12115279
复制相似问题