Read the statement by Michael Teeuw here.
Calendar showing "in X day" wrongly
-
@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?
-
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.
-
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.
-
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.
-
@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.
-
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.
-
@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.
-
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.
-
@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.
-
Thanks for your explanation.
You talk alot of birthdays, may it be possible that the person lives in another timezone? And so facebook - somehow - get a mess, like its more than 24 hours for them but less than, like 48 or 36 for us? At least facebook looks about “where you are” about a birthday., not what time it is over there…?
Im just curious because my calendars does not provide any “tomorrow” - only a “today”. The rest is showed like “in 2 days” For Birthdays I use an own hosted calendar on my webspace because I had to many alerts provided by facebook - so I checked an old photo and there I have also those values “Tomorrow” and so on… Maybe I try the event calendar and looks what happens at my mirror. Wunderlist provides also a “Tomorrow”, as it shown in the app. Facebook shows thoes values also on theyr page.
Very strange… Sorry that I can’t help you so far.