louking / rrwebapp

Race Results Web Application
0 stars 1 forks source link

support estimate date of birth for nonmembers #499

Closed louking closed 3 years ago

louking commented 3 years ago

Along with #171, there's the need to support a large body of nonmembers. This is because the use case for proportional scoring is for the Maryland/DC RRCA Grand Prix, and there are no "members" per se. In particular, we don't know the date of birth for any of the participants.

We estimate the date of birth based on the earliest race of the year, counting back based in the age in the result. This can change after someone is added to the database, if racedate, age combination implies an earlier date of birth. E.g., consider the following results. The correct estimate for dob is 2/5/1978

age race date dob est
43 2/5/2021 2/5/1978
43 2/4/2022 2/4/1979
louking commented 3 years ago

Tests

race date
earlier 2/4/21
later 2/5/21

make sure ages cross division boundary (5 year divisions)

result name race age
Test Nonmember earlier 44
Test Nonmember later 45
Testero Nonmember earlier 44
Testero Nonmember later 45