Compare commits
3 Commits
develop
...
71cf754ac8
| Author | SHA1 | Date | |
|---|---|---|---|
| 71cf754ac8 | |||
| a200e40816 | |||
| 2d5a56188d |
@@ -114,7 +114,7 @@ class DateUtils {
|
|||||||
fun formatDateTime(unixTime: Long): String {
|
fun formatDateTime(unixTime: Long): String {
|
||||||
val date = Date(unixTime * 1000)
|
val date = Date(unixTime * 1000)
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
val dateFormat = android.icu.text.DateFormat.getDateTimeInstance(android.icu.text.DateFormat.DEFAULT, android.icu.text.DateFormat.SHORT)
|
val dateFormat = android.icu.text.DateFormat.getDateTimeInstance(android.icu.text.DateFormat.RELATIVE_SHORT, android.icu.text.DateFormat.SHORT)
|
||||||
return dateFormat.format(date)
|
return dateFormat.format(date)
|
||||||
} else {
|
} else {
|
||||||
// fallback
|
// fallback
|
||||||
|
|||||||
Reference in New Issue
Block a user