Apologies for the lack of posting on the blogs recently. I'm currently engaged in rebuilding the Scheme database to make it more usable and also more joined up. This is going to take a while and I'm using Zend Framework as the base. I think I should share some code and here's a view helper for changing negative integers to a BC date and positive integers to an AD date. The class is shown below:
-
<?php
-
class DEJP_View_Helper_ADBC
-
{
-
public function ADBC($string="", $suffix="BC", $prefix="AD")
-
{
-
-
if ($string <0) {
-
-
//BC calendar dates are displayed with the BC as a suffix - eg 2600 BC
-
}
-
else
-
-
//AD calendar dates are displayed with AD as a prefix - eg. AD 410
-
}
-
}
-
-
?>
And it would be used as such within your view script:
If I create anymore that might be useful, I'll add them.
OpenCalais helped to tag this with: php • view helpers • zend framework
Possibly related posts: Quick search database fields/ plugin construction • Monitoring eBay for illicit antiquities • Neil MacGregor to chair ‘World Collections Programme’, to share British Cultural Excellence with Africa and Asia •









BCE and CE, surely?
Comment by
Andrew Larcombe — September 24, 2008 @ 11:55 pm
I don’t go for that
Comment by
Daniel Pett — September 25, 2008 @ 8:02 am