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: absoluteoption? I set my calendar toabsolutebut 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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login