A date dropdown only a developer can appreciate….
Little League has some strange rules regarding what division a child can play in. You’d think it’s based on age, and you’d be mostly right, except for the asterisk.
A child’s league age is dependent on what month they were born in. It also depends it they were born before or after Sep 1, 2005, which I think was done to “grandfather” some players in such that they wouldn’t have to move down a level.
This is summed up nicely on our Middletown, NJ little league site:
For boys born on or after September 1, 2005, your player’s Little League age for the 2017 spring season is your player’s age on August 31, 2017. Therefore, a boy born on July 5, 2007, would have a Little League age of 10 for 2017. And, a boy born on September 5, 2007, would have a Little League age of 9 for 2016.
For boys born before September 1, 2005, your player’s Little League age for the 2017 spring season is your player’s age on April 30, 2017. Therefore, a boy born on April 8, 2005, would have a Little League age of 12 for the 2016 season. A boy born on May 5, 2005, would have a Little League age of 11 this season.
Sound confusing? It is. So much so that littleleague.org create a handy little calculator to help you determine your child’s league age. Functionally it delivers. What struck me as funny (and honestly slightly amateur, inept and embarrassing) was the order of the months in the drop down – see for yourself.
January, October?, November?, December?, … what?
a = ['8', '1', '10', '2', '11', '3', '12']
["1", "10", "11", "12", "2", "3", "8"]
It’s a really silly mistake to make and easy to correct.
After some further digging, the page uses an iframe that points to this address – http://220.127.116.11/db_browse/leagueage/index.asp. Which is weird that it’s not under the littleleague.org domain. It’s also running ASP which is likely where the bad code is written.
I wonder what else we can find under /db_browse/ …
OK that’s enough for this rabbit hole!