public function PARSEMONTH::parseDay in Bibliography Module 7
Same name and namespace in other branches
- 5 bibtexParse/PARSEMONTH.php \PARSEMONTH::parseDay()
- 6.2 modules/bibtexParse/PARSEMONTH.php \PARSEMONTH::parseDay()
- 6 bibtexParse/PARSEMONTH.php \PARSEMONTH::parseDay()
- 7.3 plugins/biblio_style/bibtex/PARSEMONTH.php \PARSEMONTH::parseDay()
- 7.2 modules/bibtexParse/PARSEMONTH.php \PARSEMONTH::parseDay()
Extract day of month from field.
1 call to PARSEMONTH::parseDay()
- PARSEMONTH::init in modules/
bibtexParse/ PARSEMONTH.php
File
- modules/
bibtexParse/ PARSEMONTH.php, line 74
Class
- PARSEMONTH
- 17/June/2005 - Mark Grimshaw: month fields that have multiple dates (e.g. dec # " 5--9," or nov # " 29" # "--" # dec # " 2") are correctly parsed.
Code
public function parseDay($dayField) {
preg_match("/([0-9]+).*([0-9]+)|([0-9]+)/", $dayField, $array);
if (array_key_exists(3, $array)) {
if (!$this->startDay) {
$this->startDay = $array[3];
}
elseif (!$this->endDay) {
$this->endDay = $array[3];
}
}
else {
if (array_key_exists(1, $array)) {
$this->startDay = $array[1];
}
if (array_key_exists(2, $array)) {
$this->endDay = $array[2];
}
}
}