User blog:JoshuaJSlone/Replacing age and time calculation code

I've started on a new little programming project, to replace the behind-the-scenes part of our age calculation templates. Probably this shouldn't affect you--the goal would be to have it working the same way it does now, just by different methods. I mostly bring this up in case something breaks, you know who to point your finger at. Also, if there's some kind of new age/date-related thing you want to see, now would probably be a good time to request it. Do you need to see ages calculated not in years and months, but weeks? Now's your chance.

My reasons for doing this?
 * I was going to copy some of the age stuff to another wiki, but then I remembered how many different templates I'd need to copy to get a single thing running--the templates for current JST hour, day, month, year, the Gregorian serial date template used to calculate day differences, and then the "AgeinYMD" template on top of that. With a Lua module it's easier to stick a ton of related things together to make it easier to copy to other wikis, similar to what was done with combining all the birthday pages into Module:Birthday.
 * Lua code is supposed to be simpler and run more quickly than the old methods, since they had to jump through convoluted hoops to get a lot done. Look at the code for a template like Template:AgeinYMD and you can see it's a big mess. Not that anyone will notice the difference of a millisecond for an individual age calculation, but it's just the better long-term way to do things.
 * To me, sounds like a fun thing to do.

Lua is new to Wikia, but it's no new thing in general, so though I haven't found a module that does exactly everything we'd use it for, I've found some that are close enough to start building from, like this Module:Age from Wikipedia. I don't understand 100% of what's going on in there, but it's a good excuse to learn some more about how Lua can be used.