• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Calendar time - capitalize first letters

Scheduled Pinned Locked Moved Feature Requests
6 Posts 3 Posters 4.5k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    yo-less Module Developer
    last edited by yo-less Sep 2, 2016, 10:59 PM Sep 2, 2016, 10:42 PM

    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):

    0_1472855369397_calendar-now.png

    I have changed this behavior in my calendar.js to create a more standardized layout:
    0_1472857130558_calendar-changed.png

    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 :)

    Y O 2 Replies Last reply Sep 3, 2016, 9:56 PM Reply Quote 0
    • Y Offline
      yo-less Module Developer @yo-less
      last edited by yo-less Sep 3, 2016, 10:04 PM Sep 3, 2016, 9:56 PM

      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 to absolute but didn’t notice any difference.

      M 1 Reply Last reply Oct 1, 2016, 1:12 PM Reply Quote 1
      • M Offline
        MichMich Admin @yo-less
        last edited by Oct 1, 2016, 1:12 PM

        @yo-less About that last part (getRelative). You might want to add info about it to the calendar readme.

        Y 1 Reply Last reply Oct 1, 2016, 1:16 PM Reply Quote 0
        • Y Offline
          yo-less Module Developer @MichMich
          last edited by Oct 1, 2016, 1:16 PM

          @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

          M 1 Reply Last reply Oct 1, 2016, 6:52 PM Reply Quote 0
          • M Offline
            MichMich Admin @yo-less
            last edited by Oct 1, 2016, 6:52 PM

            @yo-less lol. Missed that. šŸ˜‚

            1 Reply Last reply Reply Quote 0
            • O Offline
              opensky727 @yo-less
              last edited by May 14, 2017, 2:37 PM

              @yo-less I want to do the same, what have you done so I can try to do the same on mine?
              Thanks

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy