A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Calendar: Change format of relative times/dates
-
@sdetweil said in Calendar: Change format of relative times/dates:
dateFormat: “MMM Do”,
dateEndFormat: “LT”,
fullDayEventDateFormat: “MMM Do”,Thanks @sdetweil, I appreciate the speedy response! I have given that a go but they don’t affect the “Monday at 07:00” at all?
-
@cokelid one left. timeFormat
-
@cokelid there are two hard coded moment() formats
fromNow()
and
calendar() -
Thanks @sdetweil!
So it’s the call to moment.calendar() as you suggested. I changed calendar.js (line 339) to pass in a customised format:calFormat = { sameDay: 'LT', nextDay: 'ddd[,] LT', nextWeek: 'ddd[,] LT', lastDay: '[Yesterday]', lastWeek: '[Last] ddd', sameElse: 'DD/MM/YYYY' }; timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar(null, calFormat));
Presumably I could easily pull that format in from
this.config
? -
@cokelid yes, same as the others