1099c152eSGreg Roach<?php 2099c152eSGreg Roach 3099c152eSGreg Roach/** 4099c152eSGreg Roach * webtrees: online genealogy 5*d11be702SGreg Roach * Copyright (C) 2023 webtrees development team 6099c152eSGreg Roach * This program is free software: you can redistribute it and/or modify 7099c152eSGreg Roach * it under the terms of the GNU General Public License as published by 8099c152eSGreg Roach * the Free Software Foundation, either version 3 of the License, or 9099c152eSGreg Roach * (at your option) any later version. 10099c152eSGreg Roach * This program is distributed in the hope that it will be useful, 11099c152eSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12099c152eSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13099c152eSGreg Roach * GNU General Public License for more details. 14099c152eSGreg Roach * You should have received a copy of the GNU General Public License 15099c152eSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 16099c152eSGreg Roach */ 17099c152eSGreg Roach 18099c152eSGreg Roachdeclare(strict_types=1); 19099c152eSGreg Roach 20099c152eSGreg Roachnamespace Fisharebest\Webtrees\Elements; 21099c152eSGreg Roach 22099c152eSGreg Roachuse Fisharebest\Webtrees\Tree; 23099c152eSGreg Roach 24099c152eSGreg Roachuse function date; 25099c152eSGreg Roachuse function strtoupper; 26099c152eSGreg Roach 27099c152eSGreg Roach/** 28099c152eSGreg Roach * DATE_VALUE := {Size=1:35} 29099c152eSGreg Roach */ 30099c152eSGreg Roachclass DateValueToday extends DateValueExact 31099c152eSGreg Roach{ 32099c152eSGreg Roach /** 33099c152eSGreg Roach * Create a default value for this element. 34099c152eSGreg Roach * 35099c152eSGreg Roach * @param Tree $tree 36099c152eSGreg Roach * 37099c152eSGreg Roach * @return string 38099c152eSGreg Roach */ 39099c152eSGreg Roach public function default(Tree $tree): string 40099c152eSGreg Roach { 41099c152eSGreg Roach return strtoupper(date('d M Y')); 42099c152eSGreg Roach } 43099c152eSGreg Roach} 44