• 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.

Absolute date

Scheduled Pinned Locked Moved Troubleshooting
9 Posts 4 Posters 5.0k 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.
  • M Offline
    mjtice
    last edited by Dec 15, 2016, 11:01 PM

    This post is deleted!
    1 Reply Last reply Reply Quote 0
    • M Offline
      mjtice
      last edited by Dec 17, 2016, 2:15 PM

      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 Apr 5, 2017, 3:21 PM Reply Quote 0
      • D Offline
        daikaiju @mjtice
        last edited by Apr 5, 2017, 3:21 PM

        @mjtice What lines did you implement that code on?

        M 1 Reply Last reply Apr 13, 2017, 1:52 AM Reply Quote 0
        • D Offline
          DeanoAus @mjtice
          last edited by Apr 12, 2017, 5:37 AM

          @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 Apr 13, 2017, 1:52 AM

            @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