X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/3080864c4cd697bd083f9fd0315f0ffababd593d..c00b91e7b8738a6f6a6c61dddc44b532c0d131d2:/nieuws.inc.php diff --git a/nieuws.inc.php b/nieuws.inc.php index a925a91..79f718d 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -42,30 +42,61 @@ class ArchiveArticle return strip_tags($this->title); } + function last() + { + return filemtime($this->page); + } + + function lastiso() + { + return date(DATE_ATOM, $this->last); + } + + function dateparts() + { + preg_match('(\d{4})/(\d{2})-(\d{2})->', $this->page, $ymd); + return $ymd; + } + + function dateiso() + { + return implode('-', $this->dateparts()); + } + function date() { - if (!preg_match('(\d{4})/(\d{2})-(\d{2})->', $this->page, $parts)) return; - return showdate($parts); + return showdate($this->dateparts); } function body() { - return fread($this->file, filesize($this->page)); + $this->title; + $rest = fread($this->file, filesize($this->page)); + if ( preg_match('{\n
(]*>)