private function BiblioEntrezPubmedArticle::date in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::date()
- 6 pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::date()
- 7.2 modules/pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::date()
Returns the publication date obtained from the given MedlineCitation's PubDate element. See the reference documentation for possible values: https://www.nlm.nih.gov/bsd/licensee/elements_descriptions.html#pubdate According to the above source it always begins with a four digit year.
Return value
string the publication date of the article
1 call to BiblioEntrezPubmedArticle::date()
- BiblioEntrezPubmedArticle::getBiblio in modules/
pubmed/ EntrezPubmedArticle.php - Returns article elements as an associative array suitable for import into a biblio node.
File
- modules/
pubmed/ EntrezPubmedArticle.php, line 211 - Provides a class for handling PubMed articles retrieved with EFetch.
Class
Code
private function date() {
$pubDate = $this->article->Article->Journal->JournalIssue->PubDate;
if (isset($pubDate->MedlineDate)) {
$date = (string) $pubDate->MedlineDate;
}
else {
$date = implode(' ', (array) $pubDate);
}
return $date;
}