Read the statement by Michael Teeuw here.
absolute date in calendar module
-
You should also set
urgency
to 0 -
Please try to write
timeFormat
instead oftimeformat
, this is case sensitive :)
Also try to play around withurgency
https://github.com/MichMich/MagicMirror/tree/master/modules/default/calendar
-
Okay, made both the changes, fixed the case in “timeFormat” and added
urgency: '0',
right next to the timeFormat tag.
But, now the events appear like this
event 1 The day after tomorrow
event 2 Feb 19th
event 3 Feb 21stStill need to fix event 1
-
Please replace
'0'
with0
Numbers should not be written with quotation marks
-
Nope, still the same.
Btw, i should let you know that I am start the MagicMirror by using the command
npm start
Should I be using some other method to start it? Do I need to clear cache or something like that? :slight_frown:
-
@qqqqqqqq
Starting your mirror for testing purpose is just fine.Please try this:
... config: { timeFormat: 'absolute', urgency: 0, getRelative: 0, calendars: [ ...
-
I’ve updated the values in both, the main config file & the calendar.js (in the modules folder) but it’s still the same.
Here is the image. http://pasteboard.co/z6KcmVgLB.jpg
-
@qqqqqqqq with the current implementation this is the expected behaviour
} else if (event.startDate - now < 2 * oneDay && event.startDate - now > 0) { if (this.translate("DAYAFTERTOMORROW") !== "DAYAFTERTOMORROW") { timeWrapper.innerHTML = this.capFirst(this.translate("DAYAFTERTOMORROW")); } else { timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow()); } }
it will be always relative
EDIT: this is only for fullday events
-
I tested it yesterday and my calendar showed “tomorrow at 15:30” and “Saturday at 14:00”
That is as absolute as it gets, imho
-
Most of my events are Fullday events. So, yeah.
Right now, I guess it gets relative for next 3/4 days, and absolute thereafter.