@@ 326-345 (lines=20) @@ | ||
323 | } |
|
324 | ||
325 | ||
326 | public function getArchiveYear() |
|
327 | { |
|
328 | require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php'; |
|
329 | $year = (int) substr($this->createdOn, 0, 4); |
|
330 | ||
331 | if (0 === $year) |
|
332 | { |
|
333 | return null; |
|
334 | } |
|
335 | ||
336 | $day = absences_getVacationOption('archivage_day'); |
|
337 | $month = absences_getVacationOption('archivage_month'); |
|
338 | ||
339 | $currentYear = new BAB_DateTime($year, $month, $day); |
|
340 | if($this->createdOn < $currentYear->getIsoDate()){ |
|
341 | $year = $year-1; |
|
342 | } |
|
343 | ||
344 | return $year; |
|
345 | } |
|
346 | ||
347 | ||
348 |
@@ 432-451 (lines=20) @@ | ||
429 | } |
|
430 | ||
431 | ||
432 | public function getArchiveYear() |
|
433 | { |
|
434 | require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php'; |
|
435 | $year = (int) substr($this->date_begin, 0, 4); |
|
436 | ||
437 | if (0 === $year) |
|
438 | { |
|
439 | return null; |
|
440 | } |
|
441 | ||
442 | $day = absences_getVacationOption('archivage_day'); |
|
443 | $month = absences_getVacationOption('archivage_month'); |
|
444 | ||
445 | $currentYear = new BAB_DateTime($year, $month, $day); |
|
446 | if($this->date_begin < $currentYear->getIsoDate()){ |
|
447 | $year = $year-1; |
|
448 | } |
|
449 | ||
450 | return $year; |
|
451 | } |
|
452 | ||
453 | ||
454 | public function archive() |
@@ 1822-1841 (lines=20) @@ | ||
1819 | } |
|
1820 | ||
1821 | ||
1822 | public function getArchiveYear() |
|
1823 | { |
|
1824 | require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php'; |
|
1825 | $year = (int) substr($this->date_begin, 0, 4); |
|
1826 | ||
1827 | if (0 === $year) |
|
1828 | { |
|
1829 | return null; |
|
1830 | } |
|
1831 | ||
1832 | $day = absences_getVacationOption('archivage_day'); |
|
1833 | $month = absences_getVacationOption('archivage_month'); |
|
1834 | ||
1835 | $currentYear = new BAB_DateTime($year, $month, $day); |
|
1836 | if($this->date_begin < $currentYear->getIsoDate()){ |
|
1837 | $year = $year-1; |
|
1838 | } |
|
1839 | ||
1840 | return $year; |
|
1841 | } |
|
1842 | ||
1843 | public function archive() |
|
1844 | { |