mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
change the date format at notification, if we show the date
This commit is contained in:
@@ -162,7 +162,7 @@ fun Context.notifyEvent(event: Event) {
|
||||
val displayedStartDate = when (startDate) {
|
||||
LocalDate.now() -> ""
|
||||
LocalDate.now().plusDays(1) -> getString(R.string.tomorrow)
|
||||
else -> Formatter.getDayAndMonth(startDate)
|
||||
else -> "${Formatter.getDateFromCode(this, Formatter.getDayCodeFromTS(event.startTS))},"
|
||||
}
|
||||
|
||||
val timeRange = if (event.getIsAllDay()) getString(R.string.all_day) else getFormattedEventTime(startTime, endTime)
|
||||
|
@@ -107,6 +107,4 @@ object Formatter {
|
||||
}
|
||||
|
||||
fun getShiftedImportTimestamp(ts: Int) = getUTCDateTimeFromTS(ts).withTime(13, 0, 0, 0).withZoneRetainFields(DateTimeZone.getDefault()).seconds()
|
||||
|
||||
fun getDayAndMonth(localDate: LocalDate) = localDate.toString("dd.MM.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user