diff --git a/src/Model/SectionValue.php b/src/Model/SectionValue.php index 9ee9912..6fd2000 100644 --- a/src/Model/SectionValue.php +++ b/src/Model/SectionValue.php @@ -53,4 +53,25 @@ public function setRepeat($repeat) $this->repeat = $repeat; return $this; } + + protected function isStamp() + { + if (!is_numeric($this->value)) { + return false; + } + if (strpos(strtolower($this->label), 'datum')!== false) { + return true; + } + return false; + } + + public function presentValue() + { + $value = $this->getValue(); + $value = nl2br($value); + if ($this->isStamp()) { + $value = date('d-m-Y', $value); + } + return $value; + } }