mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Add DateTimeFormat enum
This commit is contained in:
parent
be5574eaec
commit
c35c47b793
18 changed files with 38 additions and 26 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue