128ae205eSDavid Drury<?php 228ae205eSDavid Drury 328ae205eSDavid Drury/** 428ae205eSDavid Drury * webtrees: online genealogy 5*d11be702SGreg Roach * Copyright (C) 2023 webtrees development team 628ae205eSDavid Drury * This program is free software: you can redistribute it and/or modify 728ae205eSDavid Drury * it under the terms of the GNU General Public License as published by 828ae205eSDavid Drury * the Free Software Foundation, either version 3 of the License, or 928ae205eSDavid Drury * (at your option) any later version. 1028ae205eSDavid Drury * This program is distributed in the hope that it will be useful, 1128ae205eSDavid Drury * but WITHOUT ANY WARRANTY; without even the implied warranty of 1228ae205eSDavid Drury * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1328ae205eSDavid Drury * GNU General Public License for more details. 1428ae205eSDavid Drury * 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/>. 1628ae205eSDavid Drury */ 1728ae205eSDavid Drury 1828ae205eSDavid Drurydeclare(strict_types=1); 1928ae205eSDavid Drury 2028ae205eSDavid Drurynamespace Fisharebest\Webtrees\Census; 2128ae205eSDavid Drury 2228ae205eSDavid Druryuse Fisharebest\Webtrees\Individual; 2328ae205eSDavid Drury 2428ae205eSDavid Drury/** 2528ae205eSDavid Drury * The individual's date of birth. 2628ae205eSDavid Drury */ 2728ae205eSDavid Druryclass CensusColumnBirthDayMonthYear extends AbstractCensusColumn implements CensusColumnInterface 2828ae205eSDavid Drury{ 2928ae205eSDavid Drury /** 3028ae205eSDavid Drury * Generate the likely value of this census column, based on available information. 3128ae205eSDavid Drury * 3228ae205eSDavid Drury * @param Individual $individual 3328ae205eSDavid Drury * @param Individual $head 3428ae205eSDavid Drury * 3528ae205eSDavid Drury * @return string 3628ae205eSDavid Drury */ 3728ae205eSDavid Drury public function generate(Individual $individual, Individual $head): string 3828ae205eSDavid Drury { 39b72623feSGreg Roach return $individual->getEstimatedBirthDate()->minimumDate()->format('%j %M %Y'); 4028ae205eSDavid Drury } 4128ae205eSDavid Drury} 42