Merge pull request #2890 from MikeBishop/showTimeToday

Show time today
This commit is contained in:
Michael Teeuw 2022-07-28 15:25:50 +02:00 committed by GitHub
commit d24fe4e983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,8 @@ _This release is scheduled to be released on 2022-10-01._
## Added
- New `showTimeToday` option in calendar module shows time for current-day events even if `timeFormat` is `"relative"`
## Updated
- Removed DAYAFTERTOMORROW from English

View File

@ -37,6 +37,7 @@ Module.register("calendar", {
hidePrivate: false,
hideOngoing: false,
hideTime: false,
showTimeToday: false,
colored: false,
coloredSymbolOnly: false,
customEvents: [], // Array of {keyword: "", symbol: "", color: ""} where Keyword is a regexp and symbol/color are to be applied for matched
@ -368,7 +369,7 @@ Module.register("calendar", {
} else {
timeWrapper.innerHTML = this.capFirst(
moment(event.startDate, "x").calendar(null, {
sameDay: "[" + this.translate("TODAY") + "]",
sameDay: this.config.showTimeToday ? "LT" : "[" + this.translate("TODAY") + "]",
nextDay: "[" + this.translate("TOMORROW") + "]",
nextWeek: "dddd",
sameElse: event.fullDayEvent ? this.config.fullDayEventDateFormat : this.config.dateFormat