{% if current_session.id != session.id %}
  {% assign training_session_time = session.time_period | split: " - " %}

  {% assign start_time = training_session_time | slice: 0 | join: "" %}
  {% if start_time contains "PM" %}
    {% assign start_time = start_time | remove: " PM" %}
    {% assign split_start_time = start_time | split: ":" %}
    {% assign start_time_hour = split_start_time | slice: 0 | join: "" | abs | plus: 12 %}
    {% assign start_time_mins = split_start_time | slice: 1 | join: "" %}
  {% elsif start_time contains "AM" %}
    {% assign start_time = start_time | remove: " AM" %}
  {% endif %}

  {% assign end_time = training_session_time | slice: 1 | join: "" %}
  {% if end_time contains "PM" %}
    {% assign end_time = end_time | remove: " PM" %}
    {% assign split_end_time = end_time | split: ":" %}
    {% assign end_time_hour = split_end_time | slice: 0 | join: "" | abs | plus: 12 %}
    {% assign end_time_mins = split_end_time | slice: 1 | join: "" %}
  {% elsif end_time contains "AM" %}
    {% assign end_time = end_time | remove: " AM" %}
  {% endif %}

  <a
    class="np-training-session-tile"
    href="{% route training_session, id: session.id %}"
  >
    <i class="far fa-calendar-star np-training-session-tile-icon"></i>
    <div>
      <div class="np-training-session-tile-date">
        {{ session.month }} {{ session.day }}, {{ session.year }}
      </div>
      <div class="np-training-session-tile-time">
        {{start_time_hour}}:{{start_time_mins}} - {{end_time_hour}}:{{end_time_mins}} Uhr
      </div>
    </div>
    <i class="fas fa-chevron-right np-training-session-tile-chevron"></i>
  </a>
{% endif %}
