xref: /webtrees/app/Census/CensusColumnBirthDayDotMonthYear.php (revision d11be7027e34e3121be11cc025421873364403f9)
1ce92b752Smpwt<?php
23976b470SGreg Roach
3ce92b752Smpwt/**
4ce92b752Smpwt * webtrees: online genealogy
5*d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
6ce92b752Smpwt * This program is free software: you can redistribute it and/or modify
7ce92b752Smpwt * it under the terms of the GNU General Public License as published by
8ce92b752Smpwt * the Free Software Foundation, either version 3 of the License, or
9ce92b752Smpwt * (at your option) any later version.
10ce92b752Smpwt * This program is distributed in the hope that it will be useful,
11ce92b752Smpwt * but WITHOUT ANY WARRANTY; without even the implied warranty of
12ce92b752Smpwt * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13ce92b752Smpwt * GNU General Public License for more details.
14ce92b752Smpwt * 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/>.
16ce92b752Smpwt */
17fcfa147eSGreg Roach
18e7f56f2aSGreg Roachdeclare(strict_types=1);
1915d603e7SGreg Roach
20ce92b752Smpwtnamespace Fisharebest\Webtrees\Census;
21ce92b752Smpwt
22ce92b752Smpwtuse Fisharebest\Webtrees\Individual;
23ce92b752Smpwt
24ce92b752Smpwt/**
25ce92b752Smpwt * The individual's date of birth.
26ce92b752Smpwt */
27c1010edaSGreg Roachclass CensusColumnBirthDayDotMonthYear extends AbstractCensusColumn implements CensusColumnInterface
28c1010edaSGreg Roach{
29ce92b752Smpwt    /**
30ce92b752Smpwt     * Generate the likely value of this census column, based on available information.
31ce92b752Smpwt     *
32ce92b752Smpwt     * @param Individual $individual
3315d603e7SGreg Roach     * @param Individual $head
34ce92b752Smpwt     *
35ce92b752Smpwt     * @return string
36ce92b752Smpwt     */
375a62e0a6SGreg Roach    public function generate(Individual $individual, Individual $head): string
38c1010edaSGreg Roach    {
39b72623feSGreg Roach        return $individual->getEstimatedBirthDate()->minimumDate()->format('%j. %F %Y');
40ce92b752Smpwt    }
41ce92b752Smpwt}
42