From 28fe361d3d175e47edc5e82a94aa4aaad7ea2680 Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 9 Aug 2018 18:28:17 +0300 Subject: [PATCH] rename const --- .../src/net/osmand/telegram/utils/OsmandFormatter.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/utils/OsmandFormatter.kt b/OsmAnd-telegram/src/net/osmand/telegram/utils/OsmandFormatter.kt index 5e8e222636..6b126c46f9 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/utils/OsmandFormatter.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/utils/OsmandFormatter.kt @@ -21,7 +21,7 @@ object OsmandFormatter { private val fixed1 = DecimalFormat("0.0") private const val SHORT_TIME_FORMAT = "%02d:%02d" - private const val SHORT_SIMPLE_DATE_FORMAT = "HH:mm" + private const val SIMPLE_TIME_OF_DAY_FORMAT = "HH:mm" private val dateFormatSymbols = DateFormatSymbols.getInstance() private val localDaysStr = getLettersStringArray(dateFormatSymbols.shortWeekdays, 2) @@ -56,9 +56,9 @@ object OsmandFormatter { val calendar = Calendar.getInstance() calendar.timeInMillis = System.currentTimeMillis() + (seconds * 1000) return if (isSameDay(calendar, Calendar.getInstance())) { - SimpleDateFormat(SHORT_SIMPLE_DATE_FORMAT, Locale.getDefault()).format(calendar.time) + SimpleDateFormat(SIMPLE_TIME_OF_DAY_FORMAT, Locale.getDefault()).format(calendar.time) } else { - SimpleDateFormat(SHORT_SIMPLE_DATE_FORMAT, Locale.getDefault()).format(calendar.time) + + SimpleDateFormat(SIMPLE_TIME_OF_DAY_FORMAT, Locale.getDefault()).format(calendar.time) + " " + localDaysStr[calendar.get(Calendar.DAY_OF_WEEK)] } }