Abbreviate months in bulk download page

This commit is contained in:
Alex Cabal 2022-07-09 20:35:35 -05:00
parent 139ae6e918
commit d086ea59bd
2 changed files with 3 additions and 1 deletions

View file

@ -263,6 +263,7 @@ class Library{
} }
$obj->UpdatedString = $obj->Updated->format('M j'); $obj->UpdatedString = $obj->Updated->format('M j');
$obj->UpdatedString = preg_replace('/^(.+?)(?<!May) /', '\1. ', $obj->UpdatedString);
if($obj->Updated->format('Y') != gmdate('Y')){ if($obj->Updated->format('Y') != gmdate('Y')){
$obj->UpdatedString = $obj->Updated->format('M j, Y'); $obj->UpdatedString = $obj->Updated->format('M j, Y');
} }
@ -322,6 +323,7 @@ class Library{
} }
$obj->UpdatedString = $obj->Updated->format('M j'); $obj->UpdatedString = $obj->Updated->format('M j');
$obj->UpdatedString = preg_replace('/^(.+?)(?<!May) /', '\1. ', $obj->UpdatedString);
if($obj->Updated->format('Y') != gmdate('Y')){ if($obj->Updated->format('Y') != gmdate('Y')){
$obj->UpdatedString = $obj->Updated->format('M j, Y'); $obj->UpdatedString = $obj->Updated->format('M j, Y');
} }

View file

@ -22,7 +22,7 @@ try{
catch(Safe\Exceptions\ApcuException $ex){ catch(Safe\Exceptions\ApcuException $ex){
$result = Library::RebuildBulkDownloadsCache(); $result = Library::RebuildBulkDownloadsCache();
$years = $result['years']; $years = $result['years'];
$subjects = $result['subjectss']; $subjects = $result['subjects'];
} }
?><?= Template::Header(['title' => 'Bulk Ebook Downloads', 'highlight' => '', 'description' => 'Download zip files containing all of the Standard Ebooks released in a given month.']) ?> ?><?= Template::Header(['title' => 'Bulk Ebook Downloads', 'highlight' => '', 'description' => 'Download zip files containing all of the Standard Ebooks released in a given month.']) ?>