How about a plugin?
Year2Roman:
download | view code
Extract and Upload year2roman.php to your plugins directory, then activate Year2Roman under Plugins. Usage examples are in plugin, but here’s an example using it with the_date()
:
<?php the_date('j\t\h \o\f F ','',get_year2roman()); ?>
The date format string ('j\t\h \o\f F '
) generates “29th of June “.
Nod to Hugh Bothwell, who provided the engine to this here:
http://www.phpbuilder.com/lists/php-db/2003061/0349.php
Thread Starter
anhunt
(@anhunt)
Make that:
<?php the_date('jS of F ','',get_year2roman()); ?>
everything in it, follows the PHP date() function syntax except for the ','',get_year2roman()
for those more less familiar, once the plugin is installed, the above code get’s copied into the Main Template or:
wp-content/themes/yourthemenamehere/index.php
enabling this plugin will disable the ability to control the date formatting through the Options > Date and Time menu.
Thanks for the help Kafkaesqui.
Thread Starter
anhunt
(@anhunt)
has anyone had success implementing this “year2roman” plugin in the “archives” display (as opposed to just the main index.php page)?