fix(comb): category calculator
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 6m56s
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 6m56s
This commit is contained in:
parent
ee77975c9c
commit
7497cc399c
@ -48,25 +48,25 @@ public class Utils {
|
||||
int birthYear = toCalendar(birth_date).get(Calendar.YEAR);
|
||||
|
||||
int diff = currentSaison - birthYear;
|
||||
if (diff < 6) {
|
||||
if (diff < 7) {
|
||||
return Categorie.SUPER_MINI;
|
||||
} else if (diff < 8) {
|
||||
} else if (diff < 9) {
|
||||
return Categorie.MINI_POUSSIN;
|
||||
} else if (diff < 10) {
|
||||
} else if (diff < 11) {
|
||||
return Categorie.POUSSIN;
|
||||
} else if (diff < 12) {
|
||||
} else if (diff < 13) {
|
||||
return Categorie.BENJAMIN;
|
||||
} else if (diff < 14) {
|
||||
} else if (diff < 15) {
|
||||
return Categorie.MINIME;
|
||||
} else if (diff < 16) {
|
||||
} else if (diff < 17) {
|
||||
return Categorie.CADET;
|
||||
} else if (diff < 18) {
|
||||
} else if (diff < 19) {
|
||||
return Categorie.JUNIOR;
|
||||
} else if (diff < 24) {
|
||||
} else if (diff < 25) {
|
||||
return Categorie.SENIOR1;
|
||||
} else if (diff < 34) {
|
||||
} else if (diff < 35) {
|
||||
return Categorie.SENIOR2;
|
||||
} else if (diff < 44) {
|
||||
} else if (diff < 45) {
|
||||
return Categorie.VETERAN1;
|
||||
} else {
|
||||
return Categorie.VETERAN2;
|
||||
|
||||
@ -17,25 +17,25 @@ export function getCategoryFormBirthDate(birth_date, currentDate = new Date()) {
|
||||
const birthYear = birth_date.getFullYear()
|
||||
|
||||
const diff = currentSaison - birthYear;
|
||||
if (diff < 6) {
|
||||
if (diff < 7) {
|
||||
return "SUPER_MINI";
|
||||
} else if (diff < 8) {
|
||||
} else if (diff < 9) {
|
||||
return "MINI_POUSSIN";
|
||||
} else if (diff < 10) {
|
||||
} else if (diff < 11) {
|
||||
return "POUSSIN";
|
||||
} else if (diff < 12) {
|
||||
} else if (diff < 13) {
|
||||
return "BENJAMIN";
|
||||
} else if (diff < 14) {
|
||||
} else if (diff < 15) {
|
||||
return "MINIME";
|
||||
} else if (diff < 16) {
|
||||
} else if (diff < 17) {
|
||||
return "CADET";
|
||||
} else if (diff < 18) {
|
||||
} else if (diff < 19) {
|
||||
return "JUNIOR";
|
||||
} else if (diff < 24) {
|
||||
} else if (diff < 25) {
|
||||
return "SENIOR1";
|
||||
} else if (diff < 34) {
|
||||
} else if (diff < 35) {
|
||||
return "SENIOR2";
|
||||
} else if (diff < 44) {
|
||||
} else if (diff < 45) {
|
||||
return "VETERAN1";
|
||||
} else {
|
||||
return "VETERAN2";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user