Hi Lajos,
don't know if you will read that, but your example with Model is almost working. Only a little change is to do, we have to insert a backslash before the DateTime class, because phalconphp doesn't know it:
public function getAge(){
$from = new \DateTime($this->year.'-'.$this->month.'-'.$this->day);
$to = new \DateTime();
return $from->diff($to)->y;
}
And to call the function in my template via volt, we have to do that:
{% for birthday in user.birthday %}
{{ birthday.getAge() }}
{% endfor %}
Thx for your help
Rgds
Stefan