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.

    Absolute date

    Scheduled Pinned Locked Moved Troubleshooting
    9 Posts 4 Posters 5.3k Views 4 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.
    • D Offline
      deadherring @deadherring
      last edited by

      Anyone? Does anyone have absolute date working as I describe? Can someone post the relevant portion of their config file so I can see what you’ve done?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • M Offline
        mjtice
        last edited by

        Any word on this? I’m using a 7" raspberry pi display and that ‘Tomorrow at 10:00 AM’ eats up a lot of real estate.

        Here’s my config:

                    {
                            module: 'calendar',
                            header: 'My Calendar',
                            position: 'top_right',
                            config: {
                              calendars: [
                                {
                                  symbol: 'calendar-check-o ',
                                  url: '[redacted]'
                                }
                              ],
                              maximumEntries: 10,
                              maxTitleLength: 12,
                              titleReplace: {'Appointment':'Appt'},
                              displaySymbol: false,
                              timeFormat: 'relative'
                            }
                    },
        
        1 Reply Last reply Reply Quote 0
        • M Offline
          mjtice
          last edited by

          … and by
          {
          timeFormat: ‘relative’
          }

          I mean
          {
          timeFormat: ‘absolute’
          }
          ugh.

          1 Reply Last reply Reply Quote 0
          • M Offline
            mjtice
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • M Offline
              mjtice
              last edited by

              Turns out my problem came down mostly to not really understanding the difference between ‘absolute’ and ‘relative’… I fixed my problem by modifying the code in calendar.js slightly.

               // Otherwise just say 'Today/Tomorrow at such-n-such time'
               timeWrapper.innerHTML = moment(event.startDate, "x").calendar(null, {
                                                                      sameDay: 'H:mm',
                                                                      nextDay: '[Tomorrow] H:mm',
                                                                      nextWeek: 'dddd',
                                                                      lastDay: '[Yesterday]',
                                                                      lastWeek: '[Last] dddd',
                                                                      sameElse: 'DD/MM/YYYY'
                                                                  });
              

              I sort of hijacked this thread. Sorry (but I think my solution might help out the OP ).

              D D 2 Replies Last reply Reply Quote 0
              • D Offline
                daikaiju @mjtice
                last edited by

                @mjtice What lines did you implement that code on?

                M 1 Reply Last reply Reply Quote 0
                • D Offline
                  DeanoAus @mjtice
                  last edited by

                  @mjtice Thanks man, that solved my problem too. Except I added NextWeek: ‘dddd DD/MM/YYYY’

                  Cheers!

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mjtice @daikaiju
                    last edited by

                    @daikaiju it’s on line 245 in the current release. Keep in mind that if you upgrade you’ll lose those changes (as I did exactly 2 days after I made that post…).

                    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