git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nieuws: ignore missing day in partial article dates
[minimedit.git]
/
nieuws.inc.php
diff --git
a/nieuws.inc.php
b/nieuws.inc.php
index 35ae0925b87d443ccf1d6e722330599a692abe39..e2985692018e3db8055a5d596082cefd7a2bc307 100644
(file)
--- a/
nieuws.inc.php
+++ b/
nieuws.inc.php
@@
-9,7
+9,7
@@
function showdate($parts)
{
global $monthname;
return implode(' ', array_filter([
{
global $monthname;
return implode(' ', array_filter([
- intval($parts[3]), $parts[2] > 0 ? $monthname[intval($parts[2])] : '', $parts[1],
+ intval(
@
$parts[3]), $parts[2] > 0 ? $monthname[intval($parts[2])] : '', $parts[1],
count($parts) > 6 ? "$parts[4]:$parts[5]" : '',
]));
}
count($parts) > 6 ? "$parts[4]:$parts[5]" : '',
]));
}
@@
-60,7
+60,7
@@
class ArchiveArticle
function dateparts()
{
function dateparts()
{
- preg_match('<
/(\d{4})[/-](\d{2})-(\d{2})->
', $this->page, $ymd);
+ preg_match('<
/ (\d{4}) [/-] (\d{2}) (?:- (\d{2}) )? - >x
', $this->page, $ymd);
return $ymd;
}
return $ymd;
}