好的,最后得到了以下片段,它的工作与我的期望最接近。像SDF一样,但是速度快了很多倍-就像没有字符串解析只是为了获取数字一样:
import org.joda.time.DateTime;import org.joda.time.LocalDate;public static Date toDateJoda(int intDate) { LocalDate ldt = new LocalDate( intDate / 10000, (intDate / 100) % 100, intDate % 100); DateTime dt = ldt.toDateTimeAtStartOfDay(); return dt.toDate();}解析所有内容,并为我的案例获取下一个有效日期/时间。



