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