runnerjp Posted June 4, 2008 Share Posted June 4, 2008 just looking for some advice for this 1 as you will se it is rather complex lol ok so at the moment i have it set up so age can be found from dob! but now i would like to set it up so it finds out the agegroup that athlete is within the current structure looks like this SNR 23 + U23 U23 and O20 on 31st December in competition year U20 U20 and O17 on 31st December in competition year U17 U17 and O15 on 31st August in competition year U15 Aged 13 or 14 on 31st August at end of Competition year thing is i can do it by age but also have to add the 31st dates to see if its changed... any advise lol Link to comment https://forums.phpfreaks.com/topic/108692-advice-on-age-groups/ Share on other sites More sharing options...
craygo Posted June 4, 2008 Share Posted June 4, 2008 Why not just use the december 31st date to get their age instead of todays date. Easily write a function for both. Ray Link to comment https://forums.phpfreaks.com/topic/108692-advice-on-age-groups/#findComment-557369 Share on other sites More sharing options...
runnerjp Posted June 4, 2008 Author Share Posted June 4, 2008 so wite a function to gt age from both dates august n december then do ig 20 - 23 do this ect ect Link to comment https://forums.phpfreaks.com/topic/108692-advice-on-age-groups/#findComment-557413 Share on other sites More sharing options...
craygo Posted June 4, 2008 Share Posted June 4, 2008 Well you can write one function to do it just have a place to set the variable for the age function get_age($dob, $date) now you can check either their age from now or in december december $age = get_age("1970-04-14", "2008-12-31"); today $age = get_age("1970-04-14", date("Y-m-d")); Ray Link to comment https://forums.phpfreaks.com/topic/108692-advice-on-age-groups/#findComment-557421 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.