mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-29 18:09:25 +01:00
change the date format at notification, if we show the date
This commit is contained in:
parent
6d0ed93536
commit
b48681793d
@ -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.")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user