Function to calculate Bus Schedule in PHP
- or -
Post a project like this1299
€95(approx. $101)
- Posted:
- Proposals: 2
- Remote
- #2978351
- Awarded
Description
Experience Level: Entry
Hei Guys,
i have a functionality that needs to be implemented to calculate durations of a bus schedule. Basically there is a system that has up to 4 busses running on a daily schedule (sometimes only 1 bus is in operation, sometimes 2 or 3 or 4).
Please see the attached picture as an example and the results i need to have.
Technically i need at the end this here:
$bus1OperatingHours = [
[
'start' => '00:00:00',
'end' => '03:00:00',
'duration' => '03:00:00',
],
...
];
$bus2OperatingHours = [
...
];
$bus3OperatingHours = [
...
];
$bus4OperatingHours = [
...
];
public function getSingleBusOperatingHours($bus1OperatingHours, $bus2OperatingHours, $bus3OperatingHours, $bus4OperatingHours) {
// NEEDS TO BE IMPLEMENTED
}
public function getDoubleBusOperatingHours($bus1OperatingHours, $bus2OperatingHours, $bus3OperatingHours, $bus4OperatingHours) {
// NEEDS TO BE IMPLEMENTED
}
public function getThreeBussesOperatingHours($bus1OperatingHours, $bus2OperatingHours, $bus3OperatingHours, $bus4OperatingHours) {
// NEEDS TO BE IMPLEMENTED
}
public function getFourBussesOperatingHours($bus1OperatingHours, $bus2OperatingHours, $bus3OperatingHours, $bus4OperatingHours) {
// NEEDS TO BE IMPLEMENTED
}
// result e.g. three busses:
[
[
'start' => '07:00:00',
'end' => '09:00:00',
'duration' => '02:00:00',
],
]
i have a functionality that needs to be implemented to calculate durations of a bus schedule. Basically there is a system that has up to 4 busses running on a daily schedule (sometimes only 1 bus is in operation, sometimes 2 or 3 or 4).
Please see the attached picture as an example and the results i need to have.
Technically i need at the end this here:
$bus1OperatingHours = [
[
'start' => '00:00:00',
'end' => '03:00:00',
'duration' => '03:00:00',
],
...
];
$bus2OperatingHours = [
...
];
$bus3OperatingHours = [
...
];
$bus4OperatingHours = [
...
];
public function getSingleBusOperatingHours($bus1OperatingHours, $bus2OperatingHours, $bus3OperatingHours, $bus4OperatingHours) {
// NEEDS TO BE IMPLEMENTED
}
public function getDoubleBusOperatingHours($bus1OperatingHours, $bus2OperatingHours, $bus3OperatingHours, $bus4OperatingHours) {
// NEEDS TO BE IMPLEMENTED
}
public function getThreeBussesOperatingHours($bus1OperatingHours, $bus2OperatingHours, $bus3OperatingHours, $bus4OperatingHours) {
// NEEDS TO BE IMPLEMENTED
}
public function getFourBussesOperatingHours($bus1OperatingHours, $bus2OperatingHours, $bus3OperatingHours, $bus4OperatingHours) {
// NEEDS TO BE IMPLEMENTED
}
// result e.g. three busses:
[
[
'start' => '07:00:00',
'end' => '09:00:00',
'duration' => '02:00:00',
],
]
Thomas G.
100% (1)Projects Completed
1
Freelancers worked with
1
Projects awarded
100%
Last project
25 Sep 2020
Germany
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies