User blog:JoshuaJSlone/Birthdays overhaul

Hey guys. I recently mentioned Lua is here, which should allow for more complex programming on the site. As my first major project with it, I've been workign on redoing the "Hello! Project Birthdays" system.

The old way was implemented last year. It works fine at its intended task, and was a big improvement over someone having to manually adjust the list of birthdays on the main page every day or so. However, it is a bit unwieldy to work with since it depends on every day having its own page with the proper birthdays listed on it. And things like the "Which birthday will it be?" number which makes sense on the main page made just looked weird in any of the other ways I experimented with displaying the birthdays.

With the new way, everyone will basically be listed in one big table, so adding or removing people will be quite easy. Since Lua allows for more complex programming I added some new options. It's possible to tell it a minimum number of birthdays to display, so even if there's nothing in the next week, it can show the next few in line. The number of days to go out and the minimum to list are adjustable, too, so if you have some reason to want to display 3 weeks of upcoming birthdays or the next 30 birthdays, that's possible. produces

Since all that birthday data was in a big table anyway, I tried out some other ways of displaying them, too. To see birthdays from August, you can do something like which produces

Displaying from a year instead of a day isn't much different.

One I think is pretty cool because we've had nothing like it before: You can have it show all people of a certain age.

Those Year and Age lists probably look a bit small if you're looking at this relatively soon after I wrote this blog entry--my greater focus was on the programming side, so I only have a fraction of the actual birthday information in right now. Probably I'll get that finished within a day, though.

Oh, and one last cool thing about this--since everything is in one file rather than spread out among hundreds, it will be very easy to put on the other-language wikis--at least once they enable Lua. It might take a little tweaking depending on how dates are commonly shown in different languages, but the bulk of it should be a snap to copy. I'm storing kanji names alongside the form we normally see, so with a few more minor code modifications it could even be quickly applied to Chinese/Japanese wikis.