Add DateTimeFormat enum

This commit is contained in:
Alex Cabal 2024-11-08 16:41:15 -06:00
parent be5574eaec
commit c35c47b793
18 changed files with 38 additions and 26 deletions

View file

@ -54,11 +54,11 @@ class AtomFeed extends Feed{
foreach($this->Entries as $entry){
$obj = new StdClass();
if($entry instanceof Ebook){
$obj->Updated = $entry->EbookUpdated->format('Y-m-d\TH:i:s\Z');
$obj->Updated = $entry->EbookUpdated->format(Enums\DateTimeFormat::Iso->value);
$obj->Id = SITE_URL . $entry->Url;
}
else{
$obj->Updated = $entry->Updated !== null ? $entry->Updated->format('Y-m-d\TH:i:s\Z') : '';
$obj->Updated = $entry->Updated !== null ? $entry->Updated->format(Enums\DateTimeFormat::Iso->value) : '';
$obj->Id = $entry->Id;
}
$currentEntries[] = $obj;