User API guide/uk: Difference between revisions

Created page with "'''Приклад коду для отримання матриці часу початку''' <br><br> <nowiki>$dateFrom = '2015-03-03'; $dateTo = '2015-03-04'; $serviceId = 1; $performerId = 1; $qty = 1; $availableTime = $client->getStartTimeMatrix($dateFrom, $dateTo, $serviceId, $performerId, $qty); // повертає масив ( // '2015-03-03' => array('09:00:00', '09:30:00', '10:00:00', ....), // '2015-03-04' => масив('09:00:00', '09:30:00'..."
Created page with "'''Приклад коду для розрахунку часу закінчення бронювання''' <br><br> <nowiki>$startDateTime = '2015-03-03 09:00:00'; $serviceId = 1; $performerId = 1; $availableTime = $client->calculateEndTime($startDateTime, $serviceId, $performerId); // повертає '2015-03-03 10:00:00' </nowiki> <br><be>"
Tags: Mobile edit Mobile web edit
Line 192: Line 192:




<div lang="en" dir="ltr" class="mw-content-ltr">
Ще один корисний метод, який може вам знадобитися, — calculateEndTime. Кожна послуга може мати свою тривалість, а також співробітники вашої компанії можуть мати різний графік роботи в різні дні. Тож за допомогою цього методу ви можете правильно показати клієнту дату та час закінчення послуги, яку він забронював.
Another usefull method you may need is calculateEndTime. Each service can have its own duration, also your company's employees possible have different work schedule form day to day. So using this method you can show to a client an end date and time of the service he've booked in a correct way.
<br><be>
<br><be>
</div>






<div lang="en" dir="ltr" class="mw-content-ltr">
'''Приклад коду для розрахунку часу закінчення бронювання'''
'''Code example of calculating booking end time'''
<br><br>
<br><br>
  <nowiki>$startDateTime = '2015-03-03 09:00:00';
  <nowiki>$startDateTime = '2015-03-03 09:00:00';
$serviceId = 1;
$serviceId = 1;
$performerId = 1;
$performerId = 1;
$availableTime = $client->calculateEndTime($startDateTime, $serviceId, $performerId);
$availableTime = $client-&gt;calculateEndTime($startDateTime, $serviceId, $performerId);
// returns '2015-03-03 10:00:00'
// повертає '2015-03-03 10:00:00'
</nowiki>
</nowiki>
<br><be>
<br><be>
</div>