I'm in the process of creating scripts to help my hockey league manage and present information about the leagues and games online. As you can imagine, penalty minutes is one of the things we wanna track. We need to track the second the penalty happened on the game clock (no UNIX timestamps) and dynamically determine how many minutes that amounts to.
For instance, say I get a penalty in the third period with only 1:30 left to play. What would be a 2:00 penalty for roughing is now only 1:30. At least that is all that is added to my season and game totals.
I'm kinda at a lost on how to track that in such a way that is easy to do calculations with later. Should I make the users input the data in a ##:## format where the first ## is the minute in the game (ie 2nd period means ## > 20 and 3rd period means ## > 40) followed by the seconds into that minute? That seems to be the only thing I come up with but seems to be asking a lot from the 16 year old girls who do the score keeping.
Thoughts?