@ -1,4 +1,5 @@
{% load shift_extras %}
<div class="column is-one-quarter">
<div class="box">
<div class="content">
{% extends "helper_base.html" %}
{% block title %}Schichtansicht{% endblock %}
@ -5,8 +5,8 @@ register = template.Library()
@register.filter(name="duration")
def duration(value):
secs = value.total_seconds()
hours = int(secs // (60 * 60))
secs = int(value.total_seconds())
hours = secs // (60 * 60)
secs = secs % (hours * 60 * 60)
minutes = int(secs // 60)
return f"{hours}:{minutes:02d}"
minutes = secs // 60
return f"{hours}:{minutes:02d}h"