Page 1 of 1

Card find date calculations seem to be off by 1 day

PostPosted: Sat Apr 01, 2023 5:30 am
by Vylixan
This card was found at 2018-04-01, 05:57:01 CEST,
I'm at 2023-04-01 14:08:30 CEST (time is aprox)
That's about 5 years, 0 days, 8 hours, 8 minutes, and 39 seconds between both events
But NS tells me: 5 years 1 day ago: Found by The maliki caliphate
Now i know that calculating time and date differences is kind of a finicky thing to do. (See here and here for more about that problem).
But it would be nice to show the correct time diff in a non-absolute way, especially since the start of Cards is 5 years ago today.

What I think is happening here is that it's taking an absolute days and years approach, and thus also using the extra leap-year day in 2020. And then we get into the different meanings of "ago" and "year" and it gets really complicated and annoying real fast. Because if you calculate a true time diff between those two dates (probably in seconds), and then present that in a different way (by years and days) there is always going to be a variance. In absolute numbers, both datetimes are approx. 157,899,830 seconds apart from each other, this is about 5 years, 1 day, and 8 hours, this includes the extra day, but if you just do 5 years and 8 hours you get 157,813,430 seconds. (Both numbers are an approximation).

So what I would suggest, any find time over a year (365 days) is displayed in a non absolute way, instead of based on the true time difference between the two dates, which is always going to be different, this would feel close to how we use years in common parlance when celebrating events, we don't shift birthdays around when the number of days between them is not exactly 365 days after all.

I realise this is a real niche and nice2have thing to post, and not really a priority to solve anytime if at all, just wanted to mention it here.

PostPosted: Sat Apr 01, 2023 6:38 am
by Ballotonia
So... you include a video which elaborately explains 'that way lies madness' and then you request us to go there?


PostPosted: Sat Apr 01, 2023 7:01 am
by Vylixan
Ballotonia wrote:So... you include a video which elaborately explains 'that way lies madness' and then you request us to go there?


You make a very good point.
Uhm, I shall retract my proposal. I also I had trouble getting it to work nicely in my own pseudocode when I was messing around just now.
I have no intention to make the admins any more mad then they already are :p .