xref: /webtrees/resources/views/help/date.phtml (revision 090a06287954f43677f06ea778b3f67c029de8fe)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4
5/**
6 * @var array<string,string> $date_dates
7 * @var array<string,string> $date_period_dates
8 * @var array<string,string> $date_period_shortcuts
9 * @var array<string,string> $date_range_dates
10 * @var array<string,string> $date_range_shortcuts
11 * @var array<string,string> $date_shortcuts
12 * @var array<string,string> $french_dates
13 * @var array<string,string> $hijri_dates
14 * @var array<string,string> $jewish_dates
15 * @var array<string,string> $julian_dates
16 */
17
18?>
19
20<p>
21    <?= I18N::translate('Dates are stored using English abbreviations and keywords. Shortcuts are available as alternatives to these abbreviations and keywords.') ?>
22</p>
23
24<table class="table table-bordered table-sm">
25    <thead>
26        <tr>
27            <th>
28                <?= I18N::translate('Date') ?>
29            </th>
30            <th>
31                <?= I18N::translate('Format') ?>
32            </th>
33            <th>
34                <?= I18N::translate('Shortcut') ?>
35            </th>
36        </tr>
37    </thead>
38    <tbody>
39        <?php foreach ($date_dates as $code => $date) : ?>
40            <tr>
41                <td>
42                    <?= $date ?>
43                </td>
44                <td>
45                    <kbd dir="ltr" lang="en"><?= $code ?></kbd>
46                </td>
47                <td>
48                    <?php foreach ($date_shortcuts[$code] as $shortcut) : ?>
49                        <kbd dir="ltr" lang="en"><?= $shortcut ?></kbd>
50                        <br>
51                    <?php endforeach ?>
52                </td>
53            </tr>
54        <?php endforeach ?>
55    </tbody>
56</table>
57
58<p>
59    <?= I18N::translate('Date ranges are used to indicate that an event, such as a birth, happened on an unknown date within a possible range.') ?>
60</p>
61
62<table class="table table-bordered table-sm">
63    <thead>
64        <tr>
65            <th>
66                <?= I18N::translate('Date range') ?>
67            </th>
68            <th>
69                <?= I18N::translate('Format') ?>
70            </th>
71            <th>
72                <?= I18N::translate('Shortcut') ?>
73            </th>
74        </tr>
75    </thead>
76    <tbody>
77        <?php foreach ($date_range_dates as $code => $date) : ?>
78            <tr>
79                <td>
80                    <?= $date ?>
81                </td>
82                <td>
83                    <kbd dir="ltr" lang="en"><?= $code ?></kbd>
84                </td>
85                <td>
86                    <?php foreach ($date_range_shortcuts[$code] as $shortcut) : ?>
87                        <kbd dir="ltr" lang="en"><?= $shortcut ?></kbd>
88                        <br>
89                    <?php endforeach ?>
90                </td>
91            </tr>
92        <?php endforeach ?>
93    </tbody>
94</table>
95
96<p>
97    <?=I18N::translate('Date periods are used to indicate that a fact, such as an occupation, continued for a period of time.') ?>
98</p>
99
100<table class="table table-bordered table-sm">
101    <thead>
102        <tr>
103            <th>
104                <?= I18N::translate('Date period') ?>
105            </th>
106            <th>
107                <?= I18N::translate('Format') ?>
108            </th>
109            <th>
110                <?= I18N::translate('Shortcut') ?>
111            </th>
112        </tr>
113    </thead>
114    <tbody>
115        <?php foreach ($date_period_dates as $code => $date) : ?>
116            <tr>
117                <td>
118                    <?= $date ?>
119                </td>
120                <td>
121                    <kbd dir="ltr" lang="en"><?= $code ?></kbd>
122                </td>
123                <td>
124                    <?php foreach ($date_period_shortcuts[$code] as $shortcut) : ?>
125                        <kbd dir="ltr" lang="en"><?= $shortcut ?></kbd>
126                        <br>
127                    <?php endforeach ?>
128                </td>
129            </tr>
130        <?php endforeach ?>
131    </tbody>
132</table>
133
134<p>
135    <?= I18N::translate('Simple dates are assumed to be in the gregorian calendar. To specify a date in another calendar, add a keyword before the date. This keyword is optional if the month or year format make the date unambiguous.') ?>
136</p>
137
138<table class="table table-bordered table-sm">
139    <thead>
140        <tr>
141            <th>
142                <?= I18N::translate('Date') ?>
143            </th>
144            <th>
145                <?= I18N::translate('Format') ?>
146            </th>
147        </tr>
148    </thead>
149    <tbody>
150        <tr>
151            <th colspan="2">
152                <?= I18N::translate('Julian') ?>
153            </th>
154        </tr>
155        <?php foreach ($julian_dates as $code => $date) : ?>
156            <tr>
157                <td>
158                    <?= $date ?>
159                </td>
160                <td>
161                    <kbd dir="ltr" lang="en"><?= $code ?></kbd>
162                </td>
163            </tr>
164        <?php endforeach ?>
165
166        <tr>
167            <th colspan="2">
168                <?= I18N::translate('Jewish') ?>
169            </th>
170        </tr>
171        <?php foreach ($jewish_dates as $code => $date) : ?>
172            <tr>
173                <td>
174                    <?= $date ?>
175                </td>
176                <td>
177                    <kbd dir="ltr" lang="en"><?= $code ?></kbd>
178                </td>
179            </tr>
180        <?php endforeach ?>
181
182        <tr>
183            <th colspan="2">
184                <?= I18N::translate('Hijri') ?>
185            </th>
186        </tr>
187        <?php foreach ($hijri_dates as $code => $date) : ?>
188            <tr>
189                <td>
190                    <?= $date ?>
191                </td>
192                <td>
193                    <kbd dir="ltr" lang="en"><?= $code ?></kbd>
194                </td>
195            </tr>
196        <?php endforeach ?>
197
198        <tr>
199            <th colspan="2">
200                <?= I18N::translate('French') ?>
201            </th>
202        </tr>
203        <?php foreach ($french_dates as $code => $date) : ?>
204            <tr>
205                <td>
206                    <?= $date ?>
207                </td>
208                <td>
209                    <kbd dir="ltr" lang="en"><?= $code ?></kbd>
210                </td>
211            </tr>
212        <?php endforeach ?>
213    </tbody>
214</table>
215