Ratings | | Unique User Downloads | | Download Rankings |
Not enough user ratings | | Total: 186 This week: 1 | | All time: 8,635 This week: 571 |
Example
<?php
include_once 'Response.php';
$o = new Response( null, 'Asia/Calcutta' );
$k = $o->next('2016-01-01 09:02:30');
$response = $k->response;
$reasons = $k->reasons;
$current = $k->current;
$next = $k->next;
echo 'Current Date : ', $current->format('F'), ' ' , $current->format('d'), ' ' , $current->format('l'), ' ' , $current->format('h'), ':' , $current->format('i'), ' ' , $current->format('A'), '<br>' ;
echo 'Response in : ', $response, '<br>' ;
echo 'Reasons for delay : ';
if ( $reasons ) {
echo '<ul>';
foreach ($reasons as $key => $value) {
if ( is_array($value) ) {
echo '<li>';
echo $key . ' -> ' . implode(', ', $value);
echo '</li>';
}
else {
echo '<li>';
echo $key . ' -> ' . $value;
echo '</li>';
}
}
echo '</ul>';
}
echo 'Response Date : ', $next->format('F'), ' ' , $next->format('d'), ' ' , $next->format('l'), ' ' , $next->format('h'), ':' , $next->format('i'), ' ' , $next->format('A'), '<br>' ;
|
Details
Response
This class can compute the next working day from today.
It extends the DateTime class and takes a given time of the day, which defaults to now, and computes the next working day.
The class considers a range of working hours, and whether it is Sunday or an holiday to exclude from the list working days.
It can also return the formatted day according to a given format template.
Added holidays reasons.
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.