Return to Project-GC

Welcome to Project-GC Q&A. Ask questions and get answers from other Project-GC users.

If you get a good answer, click the checkbox on the left to select it as the best answer.

Upvote answers or questions that have helped you.

If you don't get clear answers, edit your question to make it clearer.

0 votes
763 views
My finds totals don't add up.

I have found two days in the year where my finds are not added to my stats. I have been using the "top finders" stat and searching by county, and each month adds up, but the whole year is not adding up.

I am two days short, both are 1st of the month, (they don't appear in the previous month)

1st May and 1st July, Which put my finds per county out by 60 finds.

Anyone know why this maybe??
closed with the note: Problem identified by Target, thanks for the help!
in Bug reports by maattmoo (120 points)
closed by maattmoo
It is a bug with date caculations. the problem is that April only haves 30 day and you have set it to 31.
If you set it to april 30 you will get correct values. I suspect the same for your last post when July only have 30 days

2016-01-01 to 2016-04-31 gives 658 finds
but
2016-01-01 to 2016-04-30 gives 618 finds
http://project-gc.com/Statistics/Top?profile_name=maattmoo&profile_country=United+Kingdom&profile_region=South+East+England&country=United+Kingdom&region=South+East+England&county=Kent&fromyyyy=2016&frommm=1&fromdd=1&toyyyy=2016&tomm=4&todd=30&submit=Filter
It likely included 2016-05-01 since you have 40 find on that day.

I have reported the bug
Thanks, seems strange to count an extra day but that makes it all correct!
Thanks for the help, and a suitable answer!
Kind regards
I suspect that some code uses another date format. If you convert the date to a format where the day number(ordinal dates) of the year is used

Jan 31 = 31
Feb 1= 32
Dec 31 = 365/366 (depending of leap year)

If you calculate it like:
Take the (number for the first day of the month)-1 and add the day of the month.
And then add one if a leap year and month >2

The code is easy to do and will work if input data i correct but it not i would result in this bug. Lots of code assume correct values.

The problem is that it is that the input data is not validate. There has to be som code that changes the impossible date.

A format like that is quite resonable to use because the you can check if a date is before som value with a quick comparison of a integer instead of comparing a long strings. Tests in that format will be faster

Time format like that is often used in for example https://en.wikipedia.org/wiki/Unix_time
...