Change 'timestamp' properties on objects to more descriptive names

This commit is contained in:
Alex Cabal 2022-06-29 17:19:28 -05:00
parent 18f761929a
commit dbefba6b94
32 changed files with 74 additions and 74 deletions

View file

@ -12,7 +12,7 @@ print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
<title><?= Formatter::ToPlainXmlText($title) ?></title>
<? if($subtitle !== null){ ?><subtitle><?= Formatter::ToPlainXmlText($subtitle) ?></subtitle><? } ?>
<icon><?= SITE_URL ?>/images/logo.png</icon>
<updated><?= $updatedTimestamp->format('Y-m-d\TH:i:s\Z') ?></updated>
<updated><?= $updated->format('Y-m-d\TH:i:s\Z') ?></updated>
<author>
<name>Standard Ebooks</name>
<uri><?= SITE_URL ?></uri>

View file

@ -7,8 +7,8 @@
<uri><?= SITE_URL . Formatter::ToPlainXmlText($entry->AuthorsUrl) ?></uri>
</author>
<? } ?>
<published><?= $entry->Timestamp->format('Y-m-d\TH:i:s\Z') ?></published>
<updated><?= $entry->ModifiedTimestamp->format('Y-m-d\TH:i:s\Z') ?></updated>
<published><?= $entry->Created->format('Y-m-d\TH:i:s\Z') ?></published>
<updated><?= $entry->Modified->format('Y-m-d\TH:i:s\Z') ?></updated>
<rights>Public domain in the United States. Users located outside of the United States must check their local laws before using this ebook. Original content released to the public domain via the Creative Commons CC0 1.0 Universal Public Domain Dedication.</rights>
<summary type="text"><?= Formatter::ToPlainXmlText($entry->Description) ?></summary>
<content type="html"><?= Formatter::ToPlainXmlText($entry->LongDescription) ?></content>

View file

@ -9,7 +9,7 @@ $startDate = new DateTime('2022-07-01');
$endDate = new DateTime('2022-07-31');
$autoHide = $autoHide ?? true;
$showDonateButton = $showDonateButton ?? true;
$current = (Db::Query('SELECT count(*) as PatronCount from Patrons where Timestamp >= ?', [$startDate]))[0]->PatronCount;
$current = (Db::Query('SELECT count(*) as PatronCount from Patrons where Created >= ?', [$startDate]))[0]->PatronCount;
$target = 70;
$stretchCurrent = 0;
$stretchTarget = 20;

View file

@ -11,9 +11,9 @@
<? if($author->NacoafUrl !== null){ ?><schema:sameAs><?= Formatter::ToPlainXmlText($author->NacoafUrl) ?></schema:sameAs><? } ?>
</author>
<? } ?>
<published><?= $entry->Timestamp->format('Y-m-d\TH:i:s\Z') ?></published>
<dc:issued><?= $entry->Timestamp->format('Y-m-d\TH:i:s\Z') ?></dc:issued>
<updated><?= $entry->ModifiedTimestamp->format('Y-m-d\TH:i:s\Z') ?></updated>
<published><?= $entry->Created->format('Y-m-d\TH:i:s\Z') ?></published>
<dc:issued><?= $entry->Created->format('Y-m-d\TH:i:s\Z') ?></dc:issued>
<updated><?= $entry->Modified->format('Y-m-d\TH:i:s\Z') ?></updated>
<dc:language><?= Formatter::ToPlainXmlText($entry->Language) ?></dc:language>
<dc:publisher>Standard Ebooks</dc:publisher>
<rights>Public domain in the United States. Users located outside of the United States must check their local laws before using this ebook. Original content released to the public domain via the Creative Commons CC0 1.0 Universal Public Domain Dedication.</rights>

View file

@ -26,7 +26,7 @@ print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
<title><?= Formatter::ToPlainXmlText($title) ?></title>
<? if($subtitle !== null){ ?><subtitle><?= Formatter::ToPlainXmlText($subtitle) ?></subtitle><? } ?>
<icon><?= SITE_URL ?>/images/logo.png</icon>
<updated><?= $updatedTimestamp->format('Y-m-d\TH:i:s\Z') ?></updated>
<updated><?= $updated->format('Y-m-d\TH:i:s\Z') ?></updated>
<? if($isCrawlable){ ?><fh:complete/><? } ?>
<author>
<name>Standard Ebooks</name>

View file

@ -17,7 +17,7 @@ print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
<title><?= Formatter::ToPlainXmlText($title) ?></title>
<? if($subtitle !== null){ ?><subtitle><?= Formatter::ToPlainXmlText($subtitle) ?></subtitle><? } ?>
<icon><?= SITE_URL ?>/images/logo.png</icon>
<updated><?= $updatedTimestamp->format('Y-m-d\TH:i:s\Z') ?></updated>
<updated><?= $updated->format('Y-m-d\TH:i:s\Z') ?></updated>
<author>
<name>Standard Ebooks</name>
<uri><?= SITE_URL ?></uri>

View file

@ -2,7 +2,7 @@
<title><?= Formatter::ToPlainXmlText($entry->Title) ?>, by <?= Formatter::ToPlainXmlText(strip_tags($entry->AuthorsHtml)) ?></title>
<link><?= SITE_URL . Formatter::ToPlainXmlText($entry->Url) ?></link>
<description><?= Formatter::ToPlainXmlText($entry->Description) ?></description>
<pubDate><?= $entry->Timestamp->format('r') ?></pubDate>
<pubDate><?= $entry->Created->format('r') ?></pubDate>
<guid><?= Formatter::ToPlainXmlText(preg_replace('/^url:/ius', '', $entry->Identifier)) ?></guid>
<? foreach($entry->Tags as $tag){ ?>
<category domain="https://standardebooks.org/vocab/subjects"><?= Formatter::ToPlainXmlText($tag->Name) ?></category>

View file

@ -12,7 +12,7 @@ print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
<description><?= Formatter::ToPlainXmlText($description) ?></description>
<language>en-US</language>
<copyright>https://creativecommons.org/publicdomain/zero/1.0/</copyright>
<lastBuildDate><?= $updatedTimestamp ?></lastBuildDate>
<lastBuildDate><?= $updated ?></lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<atom:link href="<?= SITE_URL . Formatter::ToPlainXmlText($url) ?>" rel="self" type="application/rss+xml"/>
<atom:link href="<?= SITE_URL ?>/ebooks/opensearch" rel="search" type="application/opensearchdescription+xml" />