xref: /webtrees/app/Module/BritishMonarchs.php (revision 3ee4c7ef16663dd8419c69876f7c40ed549d5490)
109fbf3e5SGreg Roach<?php
23976b470SGreg Roach
309fbf3e5SGreg Roach/**
409fbf3e5SGreg Roach * webtrees: online genealogy
5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
609fbf3e5SGreg Roach * This program is free software: you can redistribute it and/or modify
709fbf3e5SGreg Roach * it under the terms of the GNU General Public License as published by
809fbf3e5SGreg Roach * the Free Software Foundation, either version 3 of the License, or
909fbf3e5SGreg Roach * (at your option) any later version.
1009fbf3e5SGreg Roach * This program is distributed in the hope that it will be useful,
1109fbf3e5SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
1209fbf3e5SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1309fbf3e5SGreg Roach * GNU General Public License for more details.
1409fbf3e5SGreg Roach * You should have received a copy of the GNU General Public License
1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
1609fbf3e5SGreg Roach */
17fcfa147eSGreg Roach
1809fbf3e5SGreg Roachdeclare(strict_types=1);
1909fbf3e5SGreg Roach
2009fbf3e5SGreg Roachnamespace Fisharebest\Webtrees\Module;
2109fbf3e5SGreg Roach
2209fbf3e5SGreg Roachuse Illuminate\Support\Collection;
2309fbf3e5SGreg Roach
2409fbf3e5SGreg Roach/**
2509fbf3e5SGreg Roach * Class BritishMonarchs
2609fbf3e5SGreg Roach */
2709fbf3e5SGreg Roachclass BritishMonarchs extends AbstractModule implements ModuleHistoricEventsInterface
2809fbf3e5SGreg Roach{
2909fbf3e5SGreg Roach    use ModuleHistoricEventsTrait;
3009fbf3e5SGreg Roach
3109fbf3e5SGreg Roach    /**
320cfd6963SGreg Roach     * How should this module be identified in the control panel, etc.?
3309fbf3e5SGreg Roach     *
3409fbf3e5SGreg Roach     * @return string
3509fbf3e5SGreg Roach     */
3609fbf3e5SGreg Roach    public function title(): string
3709fbf3e5SGreg Roach    {
38fa24d895SGreg Roach        return 'British monarchs ����';
3909fbf3e5SGreg Roach    }
4009fbf3e5SGreg Roach
4109fbf3e5SGreg Roach    /**
4209fbf3e5SGreg Roach     * Should this module be enabled when it is first installed?
4309fbf3e5SGreg Roach     *
4409fbf3e5SGreg Roach     * @return bool
4509fbf3e5SGreg Roach     */
4609fbf3e5SGreg Roach    public function isEnabledByDefault(): bool
4709fbf3e5SGreg Roach    {
4809fbf3e5SGreg Roach        return false;
4909fbf3e5SGreg Roach    }
5009fbf3e5SGreg Roach
5109fbf3e5SGreg Roach    /**
5236779af1SGreg Roach     * @return Collection<int,string>
5309fbf3e5SGreg Roach     */
54*3ee4c7efSGreg Roach    public function historicEventsAll(string $language_tag): Collection
5509fbf3e5SGreg Roach    {
56*3ee4c7efSGreg Roach        switch ($language_tag) {
579429a0bfSGreg Roach            case 'en-AU':
589429a0bfSGreg Roach            case 'en-GB':
599429a0bfSGreg Roach            case 'en-US':
6009fbf3e5SGreg Roach                return new Collection([
6109fbf3e5SGreg Roach                    "1 EVEN William I, William the Conqueror\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 25 DEC 1066 TO @#DJULIAN@ 09 SEP 1087",
6209fbf3e5SGreg Roach                    "1 EVEN William II\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 26 SEP 1087 TO @#DJULIAN@ 02 AUG 1100",
6309fbf3e5SGreg Roach                    "1 EVEN Henry I\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 05 AUG 1100 TO @#DJULIAN@ 01 DEC 1135",
6409fbf3e5SGreg Roach                    "1 EVEN Stephen\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 22 DEC 1135 TO @#DJULIAN@ 25 OCT 1154",
6509fbf3e5SGreg Roach                    "1 EVEN Henry II\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 19 DEC 1154 TO @#DJULIAN@ 06 JUL 1189",
6609fbf3e5SGreg Roach                    "1 EVEN Richard I, Richard the Lionheart\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 03 SEP 1189 TO @#DJULIAN@ 06 APR 1199",
6709fbf3e5SGreg Roach                    "1 EVEN John\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 27 MAY 1199 TO @#DJULIAN@ 19 OCT 1216",
6809fbf3e5SGreg Roach                    "1 EVEN Louis VIII\n2 TYPE Disputed English King\n2 DATE FROM @#DJULIAN@ NOV 1216 TO @#DJULIAN@ 22 SEP 1217",
6909fbf3e5SGreg Roach                    "1 EVEN Henry III\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 28 OCT 1216 TO @#DJULIAN@ 16 NOV 1272",
7009fbf3e5SGreg Roach                    "1 EVEN Edward I\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 20 NOV 1272 TO @#DJULIAN@ 07 JUL 1307",
7109fbf3e5SGreg Roach                    "1 EVEN Edward II\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 08 JUL 1307 TO @#DJULIAN@ 20 JAN 1327",
7209fbf3e5SGreg Roach                    "1 EVEN Edward III\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 25 JAN 1327 TO @#DJULIAN@ 21 JUN 1377",
7309fbf3e5SGreg Roach                    "1 EVEN Richard II\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 22 JUN 1377 TO @#DJULIAN@ 29 SEP 1399",
7409fbf3e5SGreg Roach                    "1 EVEN Henry IV\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 30 SEP 1399 TO @#DJULIAN@ 21 MAR 1413",
7509fbf3e5SGreg Roach                    "1 EVEN Henry V\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 21 MAR 1413 TO @#DJULIAN@ 01 SEP 1422",
7609fbf3e5SGreg Roach                    "1 EVEN Henry VI\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 01 SEP 1422 TO @#DJULIAN@ 04 MAR 1461",
7709fbf3e5SGreg Roach                    "1 EVEN Edward IV\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 04 MAR 1461 TO @#DJULIAN@ 03 OCT 1470",
7809fbf3e5SGreg Roach                    "1 EVEN Henry VI\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 03 OCT 1470 TO @#DJULIAN@ 11 APR 1471",
7909fbf3e5SGreg Roach                    "1 EVEN Edward IV\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 11 APR 1471 TO @#DJULIAN@ 09 APR 1483",
8009fbf3e5SGreg Roach                    "1 EVEN Richard III\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 09 APR 1483 TO @#DJULIAN@ 22 AUG 1485",
8109fbf3e5SGreg Roach                    "1 EVEN Henry VI\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 22 AUG 1485 TO @#DJULIAN@ 22 APR 1509",
8209fbf3e5SGreg Roach                    "1 EVEN Henry VII\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 22 APR 1509 TO @#DJULIAN@ 28 JAN 1547",
8309fbf3e5SGreg Roach                    "1 EVEN Edward VI\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 28 JAN 1547 TO @#DJULIAN@ 10 JUL 1553",
8409fbf3e5SGreg Roach                    "1 EVEN Lady Jane Grey\n2 TYPE Disputed English Queen\n2 DATE FROM @#DJULIAN@ 10 JUL 1553 TO @#DJULIAN@ 19 JUL 1553",
8509fbf3e5SGreg Roach                    "1 EVEN Mary I\n2 TYPE English Queen\n2 DATE FROM @#DJULIAN@ 19 JUL 1553 TO @#DJULIAN@ 17 NOV 1558",
8609fbf3e5SGreg Roach                    "1 EVEN Philip\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 25 JUL 1554 TO @#DJULIAN@ 17 NOV 1558",
8709fbf3e5SGreg Roach                    "1 EVEN Elizabeth I\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 17 NOV 1558 TO @#DJULIAN@ 24 MAR 1603",
8809fbf3e5SGreg Roach                    "1 EVEN James I\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 24 MAR 1603 TO @#DJULIAN@ 27 MAR 1625",
8909fbf3e5SGreg Roach                    "1 EVEN Charles I\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 27 MAR 1625 TO @#DJULIAN@ 30 JAN 1649",
9009fbf3e5SGreg Roach                    "1 EVEN Oliver Cromwell\n2 TYPE Lord Protector\n2 DATE FROM @#DJULIAN@ 16 DEC 1653 TO @#DJULIAN@ 03 SEP 1658",
9109fbf3e5SGreg Roach                    "1 EVEN Richard Cromwell\n2 TYPE Lord Protector\n2 DATE FROM @#DJULIAN@ 03 SEP 1658 TO @#DJULIAN@ 07 MAY 1659",
9209fbf3e5SGreg Roach                    "1 EVEN Charles II\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 29 MAY 1660 TO @#DJULIAN@ 06 FEB 1685",
9309fbf3e5SGreg Roach                    "1 EVEN James II\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 06 FEB 1685 TO @#DJULIAN@ 13 FEB 1689",
9409fbf3e5SGreg Roach                    "1 EVEN Mary II\n2 TYPE English Queen\n2 DATE FROM @#DJULIAN@ 13 FEB 1689 TO @#DJULIAN@ 13 FEB 1689",
9509fbf3e5SGreg Roach                    "1 EVEN William II\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 13 FEB 1689 TO @#DJULIAN@ 08 MAR 1702",
9609fbf3e5SGreg Roach                    "1 EVEN Anne\n2 TYPE English Queen\n2 DATE FROM @#DJULIAN@ 08 MAR 1702 TO @#DJULIAN@ 01 MAY 1707",
9709fbf3e5SGreg Roach                    "1 EVEN Anne\n2 TYPE British Queen\n2 DATE FROM @#DJULIAN@ 01 MAY 1707 TO @#DJULIAN@ 01 AUG 1714",
9809fbf3e5SGreg Roach                    "1 EVEN George I\n2 TYPE British King\n2 DATE FROM @#DJULIAN@ 01 AUG 1714 TO @#DJULIAN@ 11 JUN 1727",
9909fbf3e5SGreg Roach                    "1 EVEN George II\n2 TYPE British King\n2 DATE FROM @#DJULIAN@ 11 JUN 1727 TO 25 OCT 1760",
10009fbf3e5SGreg Roach                    "1 EVEN George III\n2 TYPE British King\n2 DATE FROM 25 OCT 1760 TO 29 JAN 1820",
10109fbf3e5SGreg Roach                    "1 EVEN George IV\n2 TYPE British King\n2 DATE FROM 29 JAN 1820 TO 26 JUN 1830",
10209fbf3e5SGreg Roach                    "1 EVEN William IV\n2 TYPE British King\n2 DATE FROM 26 JUN 1830 TO 20 JUN 1837",
10309fbf3e5SGreg Roach                    "1 EVEN Victoria\n2 TYPE British Queen\n2 DATE FROM 20 JUN 1837 TO 22 JAN 1901",
10409fbf3e5SGreg Roach                    "1 EVEN Edward VII\n2 TYPE British King\n2 DATE FROM 22 JAN 1901 TO 06 MAY 1910",
10509fbf3e5SGreg Roach                    "1 EVEN George V\n2 TYPE British King\n2 DATE FROM 06 MAY 1910 TO 20 JAN 1936",
10609fbf3e5SGreg Roach                    "1 EVEN Edward VII\n2 TYPE British King\n2 DATE FROM 20 JAN 1936 TO 11 DEC 1936",
10709fbf3e5SGreg Roach                    "1 EVEN George VI\n2 TYPE British King\n2 DATE FROM 11 DEC 1936 TO 06 FEB 1952",
10814974d95SRAMINCNZ                    "1 EVEN Elizabeth II\n2 TYPE British Queen\n2 DATE FROM 06 FEB 1952 TO 08 SEP 2022",
10914974d95SRAMINCNZ                    "1 EVEN Charles III\n2 TYPE British King\n2 DATE FROM 08 SEP 2022",
11009fbf3e5SGreg Roach                ]);
1119429a0bfSGreg Roach
1129429a0bfSGreg Roach            default:
1139429a0bfSGreg Roach                return new Collection();
1149429a0bfSGreg Roach        }
11509fbf3e5SGreg Roach    }
11609fbf3e5SGreg Roach}
117