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.6k 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.
    • yo-lessY Offline
      yo-less Module Developer
      last edited by yo-less

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

      yo-lessY O 2 Replies Last reply Reply Quote 0
      • yo-lessY Offline
        yo-less Module Developer @yo-less
        last edited by yo-less

        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.

        MichMichM 1 Reply Last reply Reply Quote 1
        • MichMichM Offline
          MichMich Admin @yo-less
          last edited by

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

          yo-lessY 1 Reply Last reply Reply Quote 0
          • yo-lessY Offline
            yo-less Module Developer @MichMich
            last edited by

            @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

            MichMichM 1 Reply Last reply Reply Quote 0
            • MichMichM Offline
              MichMich Admin @yo-less
              last edited by

              @yo-less lol. Missed that. 😂

              1 Reply Last reply Reply Quote 0
              • O Offline
                opensky727 @yo-less
                last edited by

                @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
                  OSZAR »