日期精度计算
This commit is contained in:
parent
26836523db
commit
ebc0b87505
|
|
@ -164,7 +164,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
boolean checkType = true;
|
||||
switch (type) {
|
||||
case "Y":
|
||||
time = DateTimeServiceImpl.getTime(startDate, endDate) / (nd.doubleValue()) / 365.25;
|
||||
time = DateTimeServiceImpl.getByField(cal1, cal2, Calendar.YEAR).doubleValue();
|
||||
break;
|
||||
case "M":
|
||||
Long monthR = DateTimeServiceImpl.getByField(cal1, cal2, Calendar.YEAR) * 12 + DateTimeServiceImpl.getByField(cal1, cal2, Calendar.MONTH);
|
||||
|
|
|
|||
Loading…
Reference in New Issue