I have a site for youth basketball, where parents can list their kid to get them onto a team. The listings that get replied to by teams needing players are deleted, but some listing remain on there for months or years. To combat the potential confusion of which grade a kid is currently in, I have them list the kid's graduation year instead. Some parents, however, struggle mightely in figuring out the simple math in that.
I want to put a textbox on top of the page that they can enter their kid's current grade, then have the output be the kid's graduation year (barring any flunking, of course). I'm also wondering if there's any way to incorporate the passing of time into the script, so that nothing needs to be changed from year to year. I'm thinking that with the school year ranging from September to May, that a formula might be something like this:
12 - (grade level entered) + (current year) + 1 [adding one only if the current day is between May and December]
ANY help is heavily appreciated.
Edited by jonsan32