added function to get chart data

This commit is contained in:
Werner Masik
2023-07-04 18:07:09 +02:00
parent 51d8a18565
commit 800b490c62
2 changed files with 21 additions and 2 deletions
@@ -1,6 +1,8 @@
<?php
namespace vertragsbestandteil;
use DateTimeImmutable;
/**
* Salary always depends on employment (Dienstverhältnis) and optionally on part of contract (Vetragsbestandteil)
*/
@@ -84,6 +86,21 @@ class Gehaltsbestandteil implements IValidation, \JsonSerializable
return $this->bis;
}
public function getVonDateTime()
{
return $this->toDateTime($this->von);
}
public function getBisDateTime()
{
return $this->toDateTime($this->bis);
}
protected function toDateTime($d) {
if ($d == null) return null;
return new DateTimeImmutable($d);
}
public function getAnmerkung()
{
return $this->anmerkung;