parent
6908eeebc9
commit
befd59c2a7
2 changed files with 14 additions and 1 deletions
|
@ -104,4 +104,17 @@ class Event extends BaseEntity
|
||||||
public function isValid() {
|
public function isValid() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getFormatedDate() {
|
||||||
|
$retval = $this->startdate->format('Y-m-d H:i');
|
||||||
|
if (!is_null($this->enddate)) {
|
||||||
|
$retval .= " — ";
|
||||||
|
if ($this->startdate->format('Y-m-d') == $this->enddate->format('Y-m-d')) {
|
||||||
|
$retval .= $this->enddate->format('H:i');
|
||||||
|
} else {
|
||||||
|
$retval .= $this->enddate->format('Y-m-d H:i');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $retval;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<p class="startdate ">
|
<p class="startdate ">
|
||||||
<i class="circular icon calendar green inverted link" title="Wann?"
|
<i class="circular icon calendar green inverted link" title="Wann?"
|
||||||
data-content="Wann?"></i>{{ entity.startdate.format('Y-m-d H:i') }}
|
data-content="Wann?"></i>{{ entity.getFormatedDate() }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% if entity.location is not null %}
|
{% if entity.location is not null %}
|
||||||
|
|
Reference in a new issue