Android中localTime和localDate的替代类是什么?

use*_*564 6 java time datetime android date

我想使用从android API中获得的long值,该值将我返回的时间长为毫秒,以自Epoch以来的毫秒数表示。

我需要使用isBefore()plusDays()isAfter()之类的方法

Cursor managedCursor = getContentResolver().query(CallLog.Calls.CONTENT_URI,
                    new String[]{"number", "type", "date", "duration", "name"},
                    null, null, strOrder);
Run Code Online (Sandbox Code Playgroud)

在Java中,我可以使用LocalDate和LocalTime类来处理此问题,不幸的是,这些类在android上不存在,因此android上有哪些类似于localdate和localtime的类?

pau*_*dal 2

https://github.com/dlew/joda-time-android

这是 Android 中最常使用 time 的库。尺寸有点大,但如果这不是问题,那么它比使用 Android 提供的 utils 更好