SHARE
TWEET

Untitled

a guest Jun 17th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {%  set dateFrom = companies.Darbopradzia|date('H:i')  %}
  2.         {%  set dateFromToSeconds = dateFrom|date('H') * 3600 + dateFrom|date('i') * 60  %}
  3.  
  4.         {%  set dateUntil = companies.Darbopabaiga|date('H:i')  %}
  5.         {%  set dateUntilToSeconds = dateUntil|date('H') * 3600 + dateUntil|date('i') * 60 %}
  6.  
  7.  
  8.         {% for i in range(dateFromToSeconds, dateUntilToSeconds, durationToSeconds) %}
  9.             {% if ((i + durationToSeconds) <= dateUntilToSeconds) %}
  10.                 {%  set timeInvervalFrom = i|date("H:i", "+00:00 GMT")   %}
  11.                 {%  set timeInvervalUntil = (i + durationToSeconds)|date("H:i", "+00:00 GMT")   %}
  12.                 <td>{{ companies.Specialistas }}</td>
  13.                 <td>{{ companies.Miestas }}</td>
  14.                 <td>{{ companies.Adresas }}</td>
  15.                 <td>{{ companies.Telefononumeris }}</td>
  16.                 <td>{{timeInvervalFrom}} - {{timeInvervalUntil}}</td>
  17.                 <td>
  18.                   <a href="/companies/rezervation/{{ companies.id }}/{{timeInvervalFrom}}" class="btn btn-dark">Rezervuoti</a>
  19.                 </td><tr></tr>
  20.             {% endif %}
  21.         {% endfor %}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top