xref: /webtrees/app/Module/BritishPrimeMinisters.php (revision e873f434551745f888937263ff89e80db3b0f785)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2023 webtrees development team
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18declare(strict_types=1);
19
20namespace Fisharebest\Webtrees\Module;
21
22use Fisharebest\Webtrees\I18N;
23use Illuminate\Support\Collection;
24
25/**
26 * Class BritishPrimeMinisters
27 */
28class BritishPrimeMinisters extends AbstractModule implements ModuleHistoricEventsInterface
29{
30    use ModuleHistoricEventsTrait;
31
32    /**
33     * How should this module be identified in the control panel, etc.?
34     *
35     * @return string
36     */
37    public function title(): string
38    {
39        return 'British prime ministers ����';
40    }
41
42    /**
43     * Should this module be enabled when it is first installed?
44     *
45     * @return bool
46     */
47    public function isEnabledByDefault(): bool
48    {
49        return false;
50    }
51
52    /**
53     * @return Collection<int,string>
54     */
55    public function historicEventsAll(string $language_tag): Collection
56    {
57        switch ($language_tag) {
58            case 'en-AU':
59            case 'en-GB':
60            case 'en-US':
61                return new Collection([
62                    "1 EVEN Robert Walpole\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 03 APR 1721 TO 16 FEB 1742",
63                    "1 EVEN Spencer Compton\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 16 FEB 1742 TO 27 AUG 1743",
64                    "1 EVEN Henry Pelham\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 27 AUG 1743 TO 16 MAR 1754",
65                    "1 EVEN Thomas Pelham-Holles\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 16 MAR 1754 TO 16 NOV 1756",
66                    "1 EVEN William Cavendish\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 16 NOV 1756 TO 29 JUN 1757",
67                    "1 EVEN Thomas Pelham-Holles\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 29 JUN 1757 TO 26 MAY 1762",
68                    "1 EVEN John Stuart\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 26 MAY 1762 TO 26 MAY 1762",
69                    "1 EVEN George Grenville\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 26 MAY 1762 TO 13 JUL 1765",
70                    "1 EVEN Charles Watson-Wentworth\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 13 JUL 1765 TO 30 JUL 1766",
71                    "1 EVEN William Pitt\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 30 JUL 1766 TO 14 OCT 1768",
72                    "1 EVEN Augustus FitzRoy\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 14 OCT 1768 TO 28 JAN 1770",
73                    "1 EVEN Frederick North\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 28 JAN 1770 TO 27 MAR 1782",
74                    "1 EVEN Charles Watson-Wentworth\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 27 MAR 1782 TO 04 JUL 1782",
75                    "1 EVEN William Petty\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 04 JUL 1782 TO 02 APR 1783",
76                    "1 EVEN William Cavendish-Bentinck\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 02 APR 1783 TO 19 DEC 1783",
77                    "1 EVEN William Pitt the Younger\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 19 DEC 1783 TO 17 MAR 1801",
78                    "1 EVEN Henry Addington\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 17 MAR 1801 TO 10 MAY 1804",
79                    "1 EVEN William Pitt the Younger\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 10 MAY 1804 TO 11 FEB 1806",
80                    "1 EVEN William Grenville\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 11 FEB 1806 TO 31 MAR 1807",
81                    "1 EVEN William Cavendish-Bentinck\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 31 MAR 1807 TO 04 OCT 1809",
82                    "1 EVEN Spencer Perceval\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 04 OCT 1809 TO 08 JUN 1812",
83                    "1 EVEN Robert Jenkinson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 08 JUN 1812 TO 12 APR 1827",
84                    "1 EVEN George Canning\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 12 APR 1827 TO 31 AUG 1827",
85                    "1 EVEN Frederick John Robinson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 31 AUG 1827 TO 22 JAN 1828",
86                    "1 EVEN Arthur Wellesley, Duke of Wellington\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 22 JAN 1828 TO 22 NOV 1830",
87                    "1 EVEN Charles Grey\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 22 NOV 1830 TO 16 JUL 1834",
88                    "1 EVEN William Lamb\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 16 JUL 1834 TO 17 NOV 1834",
89                    "1 EVEN Arthur Wellesley, Duke of Wellington\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 17 NOV 1834 TO 10 DEC 1834",
90                    "1 EVEN Robert Peel\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 10 DEC 1834 TO 18 APR 1835",
91                    "1 EVEN William Lamb\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 18 APR 1835 TO 30 AUG 1841",
92                    "1 EVEN Robert Peel\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 30 AUG 1841 TO 30 JUN 1846",
93                    "1 EVEN John Russell\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 30 JUN 1846 TO 20 FEB 1852",
94                    "1 EVEN Edward Smith-Stanley\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 20 FEB 1852 TO 19 DEC 1852",
95                    "1 EVEN George Hamilton-Gordon\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 19 DEC 1852 TO 06 FEB 1855",
96                    "1 EVEN Henry John Temple\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 06 FEB 1855 TO 20 FEB 1858",
97                    "1 EVEN Edward Smith-Stanley\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 20 FEB 1858 TO 12 JUN 1859",
98                    "1 EVEN Henry John Temple\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 12 JUN 1859 TO 29 OCT 1865",
99                    "1 EVEN John Russell\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 29 OCT 1865 TO 28 JUN 1866",
100                    "1 EVEN Edward Smith-Stanley\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 28 JUN 1866 TO 27 FEB 1868",
101                    "1 EVEN Benjamin Disraeli\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 27 FEB 1868 TO 03 DEC 1868",
102                    "1 EVEN William Ewart Gladstone\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 03 DEC 1868 TO 20 FEB 1874",
103                    "1 EVEN Benjamin Disraeli\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 20 FEB 1874 TO 23 APR 1880",
104                    "1 EVEN Robert Gascoyne-Cecil\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 23 APR 1880 TO 01 FEB 1886",
105                    "1 EVEN William Ewart Gladstone\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 01 FEB 1886 TO 25 JUL 1886",
106                    "1 EVEN Robert Gascoyne-Cecil\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 25 JUL 1886 TO 15 AUG 1892",
107                    "1 EVEN William Ewart Gladstone\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 15 AUG 1892 TO 05 MAR 1894",
108                    "1 EVEN Archibald Primrose\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 05 MAR 1894 TO 25 JUN 1895",
109                    "1 EVEN Robert Gascoyne-Cecil\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 25 JUN 1895 TO 12 JUL 1902",
110                    "1 EVEN Arthur Balfour\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 12 JUL 1902 TO 05 DEC 1905",
111                    "1 EVEN Henry Campbell-Bannerman\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 05 DEC 1905 TO 05 APR 1908",
112                    "1 EVEN Herbert Henry Asquith\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 05 APR 1908 TO 06 DEC 1916",
113                    "1 EVEN David Lloyd George\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 06 DEC 1916 TO 23 OCT 1922",
114                    "1 EVEN Bonar Law\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 23 OCT 1922 TO 22 MAY 1923",
115                    "1 EVEN Stanley Baldwin\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 22 MAY 1923 TO 22 JAN 1924",
116                    "1 EVEN Ramsey MacDonald\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 22 JAN 1924 TO 07 JUN 1935",
117                    "1 EVEN Stanley Baldwin\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 07 JUN 1935 TO 28 MAY 1937",
118                    "1 EVEN Neville Chamberlain\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 28 MAY 1937 TO 10 MAY 1940",
119                    "1 EVEN Winston Churchill\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 10 MAY 1940 TO 26 JUL 1945",
120                    "1 EVEN Clement Atlee\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 26 JUL 1945 TO 26 OCT 1951",
121                    "1 EVEN Winston Churchill\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 26 OCT 1951 TO 06 APR 1955",
122                    "1 EVEN Anthony Eden\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 06 APR 1955 TO 10 JAN 1957",
123                    "1 EVEN Harold Macmillan\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 10 JAN 1957 TO 19 OCT 1963",
124                    "1 EVEN Alex Douglas-Home\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 19 OCT 1963 TO 16 OCT 1964",
125                    "1 EVEN Harold Wilson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 16 OCT 1964 TO 19 JUN 1970",
126                    "1 EVEN Edward Heath\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 19 JUN 1970 TO 04 MAR 1974",
127                    "1 EVEN Harold Wilson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 04 MAR 1974 TO 05 APR 1976",
128                    "1 EVEN James Callaghan\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 05 APR 1976 TO 04 MAY 1979",
129                    "1 EVEN Margaret Thatcher\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 04 MAY 1979 TO 28 NOV 1990",
130                    "1 EVEN John Major\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 28 NOV 1990 TO 02 MAY 1997",
131                    "1 EVEN Tony Blair\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 02 MAY 1997 TO 27 JUN 2007",
132                    "1 EVEN Gordon Brown\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 27 JUN 2007 TO 11 MAY 2010",
133                    "1 EVEN David Cameron\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 11 MAY 2010 TO 13 JUL 2016",
134                    "1 EVEN Theresa May\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 13 JUL 2016 TO 24 JUL 2019",
135                    "1 EVEN Boris Johnson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 24 JUL 2019 TO 06 SEP 2022",
136                    "1 EVEN Liz Truss\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 06 SEP 2022 TO 25 OCT 2022",
137                    "1 EVEN Rishi Sunak\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 25 OCT 2022 TO 05 JUL 2024",
138                    "1 EVEN Keir Starmer\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 05 JUL 2024",
139                ]);
140
141            default:
142                return new Collection();
143        }
144    }
145}
146