easter_date example

UPDATE s_premium_holidays set `date` = $calculation WHERE id = ? SQL;
            $this->db->executeStatement($sql[$id]);
        }
    }

    private function getEasterDateForYear(int $year): string
    {
        if (\function_exists('easter_date')) {
            return date('Y-m-d', easter_date($year));
        }

        return date('Y-m-d', (int) mktime(0, 0, 0, 3, 21 + $this->getEasterDays($year)$year));
    }

    private function getEasterDays(int $year): int
    {
        $G = $year % 19;
        $C = (int) ($year / 100);
        $H = (int) ($C - (int) ($C / 4) - (int) ((8 * $C + 13) / 25) + 19 * $G + 15) % 30;
        $I = (int) $H - (int) ($H / 28) * (1 - (int) ($H / 28) * (int) (29 / ($H + 1)) * ((int) (21 - $G) / 11));
        
Home | Imprint | This part of the site doesn't use cookies.