• 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 showing "in X day" wrongly

Scheduled Pinned Locked Moved Troubleshooting
20 Posts 6 Posters 12.4k Views 6 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.
  • K Offline
    KirAsh4 Moderator
    last edited by Nov 9, 2016, 4:35 AM

    @bhepler is correct here. It calculates based on midnight. It’s in “one day” starting at “the next closest midnight”. That’s simply the way moment.js calculates time.

    A Life? Cool! Where can I download one of those from?

    C C 2 Replies Last reply Nov 9, 2016, 5:15 AM Reply Quote 0
    • C Offline
      Cato Module Developer @KirAsh4
      last edited by Cato Nov 9, 2016, 5:16 AM Nov 9, 2016, 5:15 AM

      @KirAsh4 I agree with OP that this is an unnatural way of counting days for humans.

      Wouldn’t it be possible to do different calculations based on if it’s more or less that 24 hours?

      1 Reply Last reply Reply Quote 1
      • C Offline
        creepwood @KirAsh4
        last edited by Nov 9, 2016, 4:12 PM

        So crassly speaking, the module isn’t really working correctly.

        There are different ways to calculate it with the right result, it just depends on how you want to do it. I’m just surprised that it isn’t already working like that, I can’t be the only one finding this an issue.

        1 Reply Last reply Reply Quote 0
        • K Offline
          KirAsh4 Moderator
          last edited by Nov 13, 2016, 6:25 AM

          Guys, please read what I said above: it’s the way Moment.js calculates time. The actual module does not do any kind of time calculations, it simply passes the information to and from Moment.js.

          If you want the calculations to be done different, then please write a new module, using a different library, and submit a PR request. All of MagicMirror uses the Moment.js library, for any kind of time calculations.

          A Life? Cool! Where can I download one of those from?

          C 1 Reply Last reply Nov 14, 2016, 5:31 PM Reply Quote 1
          • C Offline
            creepwood @KirAsh4
            last edited by Nov 14, 2016, 5:31 PM

            If you want the calculations to be done different,

            I’m adamant that however you turn and twist this argument. it’s not “different” it’s incorrect. “tomorrow” and “in 1 day” means the same thing. If MMM says it isn’t, MMM is wrong.

            B T 2 Replies Last reply Nov 14, 2016, 8:16 PM Reply Quote 0
            • B Offline
              bhepler Module Developer @creepwood
              last edited by Nov 14, 2016, 8:16 PM

              @creepwood If you’re not happy with the way the module calculates the dates, you’re welcome to write your own.

              See, this way it’s not an argument. It’s a suggestion.

              1 Reply Last reply Reply Quote 0
              • T Offline
                tajno @creepwood
                last edited by Nov 14, 2016, 8:35 PM

                @creepwood

                I’m not a dev, but a workmate shows me the followed video about development and timezone(s), since then - I never mess with a dev about this thing again - Maybe it helps you to understand that those thins “aren’t just easy” as we think from our point of view :).

                https://www.youtube.com/watch?v=-5wpm-gesOY

                Have fun, its a nice insight.

                C 1 Reply Last reply Nov 14, 2016, 8:40 PM Reply Quote 2
                • C Offline
                  creepwood @tajno
                  last edited by creepwood Nov 14, 2016, 8:40 PM Nov 14, 2016, 8:40 PM

                  @tajno I don’t develop professionally any more but I’m aware of the issue with timezones but this should not be a big deal and from what I understand the MMM dev is Netherlander which is the same timezone as I’m in.

                  I’m baffled that nobody else seem to think this is an issue when it says in x day when it actually seem to mean x + 1 day.

                  T 1 Reply Last reply Nov 14, 2016, 9:04 PM Reply Quote 0
                  • T Offline
                    tajno @creepwood
                    last edited by Nov 14, 2016, 9:04 PM

                    @creepwood

                    It’s not that, I don’t have this problem - Never seen a “in 1 day”. Maybe its a wrong value provided by your calendar? Do you have multiple calendars - and it appears at everyone?

                    I use now 8 different Calendars and I don’t get that issue - So I can’t say anything about it.

                    C 1 Reply Last reply Nov 14, 2016, 9:15 PM Reply Quote 0
                    • C Offline
                      creepwood @tajno
                      last edited by Nov 14, 2016, 9:15 PM

                      @tajno I have four different calendars two from a google account (hollidays and my own calendar) and two from facebook (birthdays and events)

                      I have a facebook event in five days (although the start time of it is passed so it’s actually less than 5 x 24h) is correct, while a birthday that’s on the 18th which is also in five days according to MMM. So something is off. according the the ICS file that’s subscribed there are absolute dates on when something happens. Since the calendars that are imported have absolute time stamps there’s really nothing wrong with them, it’s on the interpretation end (MMM)

                      So the closest birthday I have in my calendar is on the 18th of november, something that occurs in 3 days plus what’s left on this day which is less than two hours. That’s happening in in 74h while MMM-calendar says it’s in five days.

                      My event that’s on the 19th (Saturday) november at 19h00 is in five days and 21h, five days is correct tuesday+wednesday+thursday+friday+saturday.

                      I’m wondering if this changes to four days after midnight or of it changes to fourdays at 19h00 on tuesday. I will have to check that when I wake up tomorrow.

                      I’m really not interested in how many 24h periods is left, I want to know how many actual days are left.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        7/20
                        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