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