private function BiblioEntrezPubmedArticle::date in Bibliography Module 6
Same name and namespace in other branches
- 6.2 modules/pubmed/EntrezPubmedArticle.php \BiblioEntrezPubmedArticle::date()
- 7 modules/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: http://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 pubmed/
EntrezPubmedArticle.php - Returns article elements as an associative array suitable for import into a biblio node.
File
- pubmed/
EntrezPubmedArticle.php, line 154 - EntrezPubmedArticle.php Provides a class for handling PubMed articles retrieved with EFetch. Orginally writen by Stefan Freudenberg
Class
- BiblioEntrezPubmedArticle
- @file EntrezPubmedArticle.php Provides a class for handling PubMed articles retrieved with EFetch. Orginally writen by Stefan Freudenberg
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;
}