Read the statement by Michael Teeuw here.
Calendar time - capitalize first letters
-
Currently the calendar times are only partly capitalized, some time phrases start with lower-case letters, some donāt
(The ones pulled from the ātranslationsā folder start with upper-case letters):I have changed this behavior in my calendar.js to create a more standardized layout:
Also, I have sent a pull request to have my changes merged into the development branch,
so if youād like to comment on this modification, feel free to do so :) -
I have found another detail that bothered me. If the calendar is set to ārelative, 6 hours before an event occurs the calendar would start showing the time in relative terms (for example: āIn 5 hoursā - but then it would stay that way until it would switch to āIn 4 hoursā an hour later, which is pretty confusing as far as Iām concerned. If Iā'm not mistaken, it stays pretty vague until 45 minutes before the event when the countdown truly starts).
I found this behavior rather counter-intuitive, as I might want to check the mirror to find out the exact time when an event starts. This is why I have introduced a tag
getRelative
, which can take any value between 0 and 48 hours. So if a user configures their calendar like this:modules: [ ... { module: 'calendar', position: 'top_left', config: { getRelative: 0.5 } } }, ...
their events start getting relative half an hour before the event (āIn 30 minutesā), if they decide they donāt like relative times at all, they can set it like this:
getRelative: 0
. This way, it is easier for users to customize the calendarās relative behavior to their needs.This is now included in my pull request.
On a related note: Can anybody tell me why there is a
timeFormat: absolute
option? I set my calendar toabsolute
but didnāt notice any difference. -
@yo-less About that last part (getRelative). You might want to add info about it to the calendar readme.
-
@MichMich I agree with you, which is why you have merged what I have done already :D
https://github.com/MichMich/MagicMirror/tree/develop/modules/default/calendar -
@yo-less lol. Missed that. š
-
@yo-less I want to do the same, what have you done so I can try to do the same on mine?
Thanks