mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge pull request #1373 from jannekalliola/develop
Calendar: Absolute dates do not show absolute even if getRelative and urgency are set to zero
This commit is contained in:
commit
b13d0aa283
@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Mixup between german and spanish translation for newsfeed.
|
- Mixup between german and spanish translation for newsfeed.
|
||||||
|
- Fixed close dates to be absolute, if no configured in the config.js - module Calendar
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
||||||
|
@ -295,8 +295,12 @@ Module.register("calendar", {
|
|||||||
// If event is within 6 hour, display 'in xxx' time format or moment.fromNow()
|
// If event is within 6 hour, display 'in xxx' time format or moment.fromNow()
|
||||||
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow());
|
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow());
|
||||||
} else {
|
} else {
|
||||||
// Otherwise just say 'Today/Tomorrow at such-n-such time'
|
if(this.config.timeFormat === "absolute") {
|
||||||
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar());
|
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").format(this.config.dateFormat));
|
||||||
|
} else {
|
||||||
|
// Otherwise just say 'Today/Tomorrow at such-n-such time'
|
||||||
|
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Check to see if the user displays absolute or relative dates with their events
|
/* Check to see if the user displays absolute or relative dates with their events
|
||||||
|
Loading…
x
Reference in New Issue
Block a user