mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
code simplification (#33355)
see https://github.com/Dolibarr/dolibarr/pull/33347
This commit is contained in:
@@ -979,25 +979,17 @@ function num_public_holiday($timestampStart, $timestampEnd, $country_code = '',
|
||||
$jour_julien = unixtojd($timestampStart);
|
||||
$jour_semaine = jddayofweek($jour_julien, 0);
|
||||
//Monday (1), Friday (5), Saturday (6) and Sunday (0)
|
||||
if ($includefriday) {
|
||||
if ($jour_semaine == 5) {
|
||||
$ferie = true;
|
||||
}
|
||||
if ($includefriday && $jour_semaine == 5) {
|
||||
$ferie = true;
|
||||
}
|
||||
if ($includesaturday) {
|
||||
if ($jour_semaine == 6) {
|
||||
$ferie = true;
|
||||
}
|
||||
if ($includesaturday && $jour_semaine == 6) {
|
||||
$ferie = true;
|
||||
}
|
||||
if ($includesunday) {
|
||||
if ($jour_semaine == 0) {
|
||||
$ferie = true;
|
||||
}
|
||||
if ($includesunday && $jour_semaine == 0) {
|
||||
$ferie = true;
|
||||
}
|
||||
if ($includemonday) {
|
||||
if ($jour_semaine == 1) {
|
||||
$ferie = true;
|
||||
}
|
||||
if ($includemonday && $jour_semaine == 1) {
|
||||
$ferie = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user