xref: /webtrees/app/Module/USPresidents.php (revision b35fcb32731c46bc277603ce8f2d37c3ea25b270)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2021 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 USPresidents
27 */
28class USPresidents 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 'United States presidents ����';
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     * All events provided by this module.
54     *
55     * @return Collection<string>
56     */
57    public function historicEventsAll(): Collection
58    {
59        switch (I18N::languageTag()) {
60            case 'en-AU':
61            case 'en-GB':
62            case 'en-US':
63                return new Collection([
64                    "1 EVEN George Washington\n2 TYPE 1st President of the United States\n2 DATE 30 APR 1789",
65                    "1 EVEN John Adams\n2 TYPE 2nd President of the United States\n2 DATE 4 MAR 1797",
66                    "1 EVEN Thomas Jefferson\n2 TYPE 3rd President of the United States\n2 DATE 4 MAR 1801",
67                    "1 EVEN James Madison\n2 TYPE 4th President of the United States\n2 DATE 4 MAR 1809",
68                    "1 EVEN James Monroe\n2 TYPE 5th President of the United States\n2 DATE 4 MAR 1817",
69                    "1 EVEN John Quincy Adams\n2 TYPE 6th President of the United States\n2 DATE 4 MAR 1825",
70                    "1 EVEN Andrew Jackson\n2 TYPE 7th President of the United States\n2 DATE 4 MAR 1829",
71                    "1 EVEN Martin Van Buren\n2 TYPE 8th President of the United States\n2 DATE 4 MAR 1837",
72                    "1 EVEN William Henry Harrison\n2 TYPE 9th President of the United States\n2 DATE 4 MAR 1841",
73                    "1 EVEN John Tyler\n2 TYPE 10th President of the United States\n2 DATE 4 APR 1841",
74                    "1 EVEN James K Polk\n2 TYPE 11th President of the United States\n2 DATE 4 MAR 1845",
75                    "1 EVEN Zachary Taylor\n2 TYPE 12th President of the United States\n2 DATE 4 MAR 1849",
76                    "1 EVEN Millard Fillmore\n2 TYPE 13th President of the United States\n2 DATE 9 JUL 1850",
77                    "1 EVEN Franklin Pierce\n2 TYPE 14th President of the United States\n2 DATE 4 MAR 1853",
78                    "1 EVEN James Buchanan\n2 TYPE 15th President of the United States\n2 DATE 4 MAR 1857",
79                    "1 EVEN Abraham Lincoln\n2 TYPE 16th President of the United States\n2 DATE 4 MAR 1861",
80                    "1 EVEN Andrew Johnson\n2 TYPE 17th President of the United States\n2 DATE 15 APR 1865",
81                    "1 EVEN Ulysses S Grant\n2 TYPE 18th President of the United States\n2 DATE 4 MAR 1869",
82                    "1 EVEN Rutherford B Hayes\n2 TYPE 19th President of the United States\n2 DATE 4 MAR 1877",
83                    "1 EVEN James A Garfield\n2 TYPE 20th President of the United States\n2 DATE 4 MAR 1881",
84                    "1 EVEN Chester A Arthur\n2 TYPE 21st President of the United States\n2 DATE 19 SEP 1881",
85                    "1 EVEN Grover Cleveland\n2 TYPE 22nd President of the United States\n2 DATE 4 MAR 1885",
86                    "1 EVEN Benjamin Harrison\n2 TYPE 23rd President of the United States\n2 DATE 4 MAR 1889",
87                    "1 EVEN Grover Cleveland\n2 TYPE 24th President of the United States\n2 DATE 4 MAR 1893",
88                    "1 EVEN William McKinley\n2 TYPE 25th President of the United States\n2 DATE 4 MAR 1897",
89                    "1 EVEN Theodore Roosevelt\n2 TYPE 26th President of the United States\n2 DATE 14 SEP 1901",
90                    "1 EVEN William Howard Taft\n2 TYPE 27th President of the United States\n2 DATE 4 MAR 1909",
91                    "1 EVEN Woodrow Wilson\n2 TYPE 28th President of the United States\n2 DATE 4 MAR 1913",
92                    "1 EVEN Warren G Harding\n2 TYPE 29th President of the United States\n2 DATE 4 MAR 1921",
93                    "1 EVEN Calvin Coolidge\n2 TYPE 30th President of the United States\n2 DATE 2 AUG 1923",
94                    "1 EVEN Herbert Hoover\n2 TYPE 31st President of the United States\n2 DATE 4 MAR 1929",
95                    "1 EVEN Franklin D Roosevelt\n2 TYPE 32nd President of the United States\n2 DATE 4 MAR 1933",
96                    "1 EVEN Harry S Truman\n2 TYPE 33rd President of the United States\n2 DATE 12 APR 1945",
97                    "1 EVEN Dwight D Eisenhower\n2 TYPE 34th President of the United States\n2 DATE 20 JAN 1953",
98                    "1 EVEN John F Kennedy\n2 TYPE 35th President of the United States\n2 DATE 20 JAN 1961",
99                    "1 EVEN Lyndon B Johnson\n2 TYPE 36th President of the United States\n2 DATE 22 NOV 1963",
100                    "1 EVEN Richard Nixon\n2 TYPE 37th President of the United States\n2 DATE 20 JAN 1969",
101                    "1 EVEN Gerald Ford\n2 TYPE 38th President of the United States\n2 DATE 9 AUG 1974",
102                    "1 EVEN Jimmy Carter\n2 TYPE 39th President of the United States\n2 DATE 20 JAN 1977",
103                    "1 EVEN Ronald Reagan\n2 TYPE 40th President of the United States\n2 DATE 20 JAN 1981",
104                    "1 EVEN George H W Bush\n2 TYPE 41st President of the United States\n2 DATE 20 JAN 1989",
105                    "1 EVEN Bill Clinton\n2 TYPE 42nd President of the United States\n2 DATE 20 JAN 1993",
106                    "1 EVEN George W Bush\n2 TYPE 43rd President of the United States\n2 DATE 20 JAN 2001",
107                    "1 EVEN Barack Obama\n2 TYPE 44th President of the United States\n2 DATE 20 JAN 2009",
108                    "1 EVEN Donald Trump\n2 TYPE 45th President of the United States\n2 DATE 20 JAN 2017",
109                    "1 EVEN Joe Biden\n2 TYPE 46th President of the United States\n2 DATE 20 JAN 2021",
110                ]);
111
112            default:
113                return new Collection();
114        }
115    }
116}
117