2021-01-31
Add ofSkeleton
formatters which localize a "skeleton" format string (based on
android.text.format.DateFormat.getBestDateTimePattern(Locale locale, String skeleton)
).
2020-04-24
Published with Gradle module metadata and a minor fix for the threetenbp
POM.
2020-04-18
Add additional factory methods for time, date, and date-time formatters. Time and date-time formatters created with the "short" time style will use the system 12-/24-hour time setting to format times.
In the rare case that a short time pattern respecting the system 12-/24-hour time setting can not be found, a fallback based on the Context's locale will be used instead.
2020-04-13
Lower the minSdk for the java.time
artifact from 15 to 4.
2020-04-11
Support core library desugaring for the java.time
artifact, allowing its use on Android 15+. Add
nullability annotations to all public methods.
Change group to dev.drewhamilton.androidtime
, and change package names similarly. Rename artifacts
to "datetimeformatters" and "datetimeformatters-threetenbp". Publish to Maven Central instead of
JCenter.
2019-07-22
Initial release. Get a time format based on the given Context's 12/24-hour time setting.
Use the javatime
artifact for Android API 26+, or the threetenbp
artifact for Android API 15+.