The Calendar in the Shire differed in several features from ours. The year no doubt was of the same length, for long ago as those times are now reckoned in years and lives of men, they were not very remote according to the memory of the Earth.
— The Lord of the Rings, Appendix D
In the summer of 1999 I embarked on yet another re-read of J.R.R. Tolkien’s The Lord of the Rings. For reasons unknown during that read-through I became incredibly enamored of the Hobbit calendar and how it worked. It occurred to me that I could write a simple BASIC program to take any modern date and render the date according to the Hobbit calendar. The end result wasn’t the most elegant program in the world, but it did what it needed to do.
Flash forward a few years. I’d begun this website, and I saw that people were doing interesting things with plugins for the WordPress blogging platform. I wondered, Could I write a plug-in to pull a date from the WordPress database and give the date according to Shire Reckoning? I went out, bought a book on PHP, and after about an hour’s worth of work I’d created my first WordPress plug-in, Shire Reckoning. And two years later, I created a sidebar widgets version.
The file contains two different template tags, shire_reckoning and shire_reckoning2.
shire_reckoning gives you the Shire Reckoning date and only the Shire Reckoning date. shire_reckoning2 gives you the Shire Reckoning date and a “This Day in Middle-Earth,” best designed for the WordPress sidebar.
One line of code is all it takes:
<?php shire_reckoning(); ?>
It can take two arguments–‘auto’ or ‘now’. Now will give you the current date in Shire Reckoning. Auto can be used to replace the_date function with shire_reckoning('auto') in your WordPress loop if you want to have your blog’s dates given in Hobbit terms.
Using shire_reckoning2 is a little more complicated, but not by much. Here’s some example code:
<h2>Shire Reckoning:</h2>
<ul>
<?php shire_reckoning2(); ?>
</ul>
Code like this in your sidebar.php file will output a formatted list of the current date according to Shire Reckoning along with a list of any notable events on that day in Middle-Earth history based upon the Tale of Years in Appendix A of The Lord of the Rings.
Alternatively, the plugin also implements a sidebar widget. You can drag and drop on the Widgets screen of your WordPress installation backend. No fuss, no mess. 🙂
If you’re a Tolkien or Lord of the Rings fan as I am and you want to spice up your WordPress blog, give Shire Reckoning a try.
2 thoughts on “Shire Reckoning”
Comments are closed.