Jump to content

Calculate Appointment Times


johnsmith153

Recommended Posts

I have an array of appointment start times throughout a day. All appointments last 30 mins.

 

I also have a list of times that staff are available to meet these appointment times (can be in any format, array etc.)

 

I need to ensure the appointment times are fully covered by members of staff.

 

E.g.


$appointmentStart[] = "09:30";
$appointmentStart[] = "10:00";
$appointmentStart[] = "11:00";
$appointmentStart[] = "12:30";
$appointmentStart[] = "13:30";
$appointmentStart[] = "15:00";
$appointmentStart[] = "17:00";

$staffMembers[] = "09:00*12:00";
$staffMembers[] = "13:00*16:00";
$staffMembers[] = "15:00*18:00";

In the above case, no, there are not enough staff members to cover this as nobody works from 12:00 to 13:00. I only really need a yes or no. Don't worry about staff breaks, they never work more than 3 hours each at a time.

 

Thanks in advance for any help.

Link to comment
https://forums.phpfreaks.com/topic/211013-calculate-appointment-times/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.