diff options
author | Torsten Grote <t@grobox.de> | 2020-04-08 14:21:11 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-04-08 14:21:11 -0300 |
commit | 874b52c6d5c0d8043f3250e2b80f5091c159ded1 (patch) | |
tree | aa994a5805a0feda15d894a6fcf1d6357f97ce29 /taler-kotlin-common/src | |
parent | 9ee202aebf6416bb336729cb3044e4921a94bee4 (diff) | |
download | taler-android-874b52c6d5c0d8043f3250e2b80f5091c159ded1.tar.gz taler-android-874b52c6d5c0d8043f3250e2b80f5091c159ded1.tar.bz2 taler-android-874b52c6d5c0d8043f3250e2b80f5091c159ded1.zip |
[wallet] add option to see exchange's fee structure
Diffstat (limited to 'taler-kotlin-common/src')
-rw-r--r-- | taler-kotlin-common/src/main/java/net/taler/common/AndroidUtils.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/taler-kotlin-common/src/main/java/net/taler/common/AndroidUtils.kt b/taler-kotlin-common/src/main/java/net/taler/common/AndroidUtils.kt index ad9dab9..64d5656 100644 --- a/taler-kotlin-common/src/main/java/net/taler/common/AndroidUtils.kt +++ b/taler-kotlin-common/src/main/java/net/taler/common/AndroidUtils.kt @@ -22,6 +22,7 @@ import android.net.ConnectivityManager import android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET import android.os.Build.VERSION.SDK_INT import android.text.format.DateUtils.DAY_IN_MILLIS +import android.text.format.DateUtils.FORMAT_ABBREV_ALL import android.text.format.DateUtils.FORMAT_ABBREV_MONTH import android.text.format.DateUtils.FORMAT_ABBREV_RELATIVE import android.text.format.DateUtils.FORMAT_NO_YEAR @@ -88,3 +89,8 @@ fun Long.toAbsoluteTime(context: Context): CharSequence { val flags = FORMAT_SHOW_TIME or FORMAT_SHOW_DATE or FORMAT_SHOW_YEAR return formatDateTime(context, this, flags) } + +fun Long.toShortDate(context: Context): CharSequence { + val flags = FORMAT_SHOW_DATE or FORMAT_SHOW_YEAR or FORMAT_ABBREV_ALL + return formatDateTime(context, this, flags) +} |