问题
I want to use long value I got from android API that return me dates as longs, represented as milliseconds since Epoch.
I need to use methods like isBefore() plusDays() isAfter()
Cursor managedCursor = getContentResolver().query(CallLog.Calls.CONTENT_URI,
new String[]{"number", "type", "date", "duration", "name"},
null, null, strOrder);
In java I can use LocalDate and LocalTime classes to handle this, unfortunately these classes don't exist on android so what classes available on android similar to localdate and localtime?
回答1:
https://github.com/dlew/joda-time-android
This is the library that most use for time in Android. A bit heavy on size, but if that's not an issue then it's way better than using utils Android gives you
来源:https://stackoverflow.com/questions/37225393/what-are-the-alternative-classes-for-localtime-and-localdate-in-android