X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/212c5051484f6ee08b95f284c133337896c42f41..f9b855c241ac7273399d1d405b63071b86b87faa:/nieuws.inc.php diff --git a/nieuws.inc.php b/nieuws.inc.php index 57c53fc..524109d 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -5,15 +5,21 @@ $monthname = ['?', 'juli', 'augustus', 'september', 'oktober', 'november', 'december', ]; -function shownewsdate($url) +function showdate($parts) { - if (!preg_match('', $url, $parts)) return; global $monthname; return implode(' ', array_filter([ intval($parts[3]), $parts[2] > 0 ? $monthname[intval($parts[2])] : '', $parts[1], + count($parts) > 6 ? "$parts[4]:$parts[5]" : '', ])); } +function shownewsdate($url) +{ + if (!preg_match('', $url, $parts)) return; + return showdate($parts); +} + function shownewsimage($url) { foreach (['jpg', 'png'] as $ext) {