I've gone through and updated all of my dates to fit the YYYY-MM-DD format. For dates that have circa, I've changed them to YYYY (circa). I've adjusted the code in my previous post to also display the circa dates as "circa YYYY". So in my show.php file I have the following:
<div class="element">
<h3>Date: </h3>
<div class="element-text">
<?php $date=item('Dublin Core', 'Date');
if ((strlen($date)==10)&&(strstr($date,'-'))){
$newdate=new DateTime(item('Dublin Core', 'Date'));
echo $newdate->format('F j, Y');}
elseif ((strlen($date)==7)&&(strstr($date,'-'))){
$newdate=new DateTime(item('Dublin Core', 'Date'));
echo $newdate->format('F, Y');}
elseif (stristr($date,'circa')){
$newdate='circa ';
$newdate.=substr($date,0,4);
echo $newdate;}
else{
echo $date;
}
?>
</div>
</div>
Then in my browse.php file, I am using browse_headings() to generate a Sort by Date link.
<?php $browseHeadings['Sort by Date'] = 'Dublin Core,Date';
echo browse_headings($browseHeadings); ?>
Now I'm trying to incorporate this into my custom next previous links. Is there a way to get the sort direction information like there is to get the search information like ?search='.$_GET['search']?
Thanks again.