Commit daaa1358 authored by Hannes Peterseim's avatar Hannes Peterseim
Browse files

Finish v1.0.3

parents 8384bcbb a1617ba8
......@@ -2,49 +2,57 @@
class to determine a day is a delivery day
v1.02.
v1.0.3
##usage
include the class or make sure an autoloader does
##isDeliveryDay
### example :
### example :
```
include('deliveryDays.php');
$dD = new deliveryDays;
if ($dD->isDeliveryDay ($date,$country,$checkWeekend=true,$sundayOnly=false) === true) {
do some things, e.g. show delivery date
}
```
### parameters
```
$dD->isDeliveryDay ($date,$country,$checkWeekend=true,$sundayOnly=false)
```
$date is a timestamp or a date parsable for strtotime
$country is a iso3361 ALPHA-2 country code
$checkWeekend (optional) is an bolean (true or false) indicate that the class should check if the date is an saturday or sunday
$sundayOnly (optional) is an bolean (true or false) indicate that the weekend check accounts only sundays (some services (e.g. dhl delivers on saturdays too))
### result
returns an boolean (true or false)
##nextPossibleDay
### example :
### example :
```
include('deliveryDays.php');
$dD = new deliveryDays;
$day = $dD->nextPossibleDay ($date,$country,$checkWeekend=true,$sundayOnly=false) === true) {
```
### parameters
```
$dD->nextPossibleDay ($date,$country,$checkWeekend=true,$sundayOnly=false)
```
$date is a timestamp or a date parsable for strtotime
$country is a iso3361 ALPHA-2 country code
$checkWeekend (optional) is an bolean (true or false) indicate that the class should check if the date is an saturday or sunday
......@@ -55,7 +63,6 @@ $sundayOnly (optional) is an bolean (true or false) indicate that the weekend ch
returns an date (Y-m-d)
##data
The class knows (possibly) the given holidays of the whole world.
If some data are absenced please let me know.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment