1a25f0a04SGreg Roach<?php 23976b470SGreg Roach 3a25f0a04SGreg Roach/** 4a25f0a04SGreg Roach * webtrees: online genealogy 5*d11be702SGreg Roach * Copyright (C) 2023 webtrees development team 6a25f0a04SGreg Roach * This program is free software: you can redistribute it and/or modify 7a25f0a04SGreg Roach * it under the terms of the GNU General Public License as published by 8a25f0a04SGreg Roach * the Free Software Foundation, either version 3 of the License, or 9a25f0a04SGreg Roach * (at your option) any later version. 10a25f0a04SGreg Roach * This program is distributed in the hope that it will be useful, 11a25f0a04SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12a25f0a04SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13a25f0a04SGreg Roach * GNU General Public License for more details. 14a25f0a04SGreg 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/>. 16a25f0a04SGreg Roach */ 17fcfa147eSGreg Roach 18e7f56f2aSGreg Roachdeclare(strict_types=1); 19e7f56f2aSGreg Roach 2076692c8bSGreg Roachnamespace Fisharebest\Webtrees\Date; 21a25f0a04SGreg Roach 22a25f0a04SGreg Roachuse Fisharebest\ExtCalendar\GregorianCalendar; 23a25f0a04SGreg Roach 24a25f0a04SGreg Roach/** 254a83f5d7SGreg Roach * Definitions for Gregorian dates. 26a25f0a04SGreg Roach */ 274a83f5d7SGreg Roachclass GregorianDate extends AbstractGregorianJulianDate 28c1010edaSGreg Roach{ 294a83f5d7SGreg Roach // GEDCOM calendar escape 3016d6367aSGreg Roach public const ESCAPE = '@#DGREGORIAN@'; 314a83f5d7SGreg Roach 3276692c8bSGreg Roach /** 3376692c8bSGreg Roach * Create a date from either: 3476692c8bSGreg Roach * a Julian day number 3576692c8bSGreg Roach * day/month/year strings from a GEDCOM date 3676692c8bSGreg Roach * another CalendarDate object 3776692c8bSGreg Roach * 38f4c767fdSGreg Roach * @param array<string>|int|AbstractCalendarDate $date 3976692c8bSGreg Roach */ 40c1010edaSGreg Roach public function __construct($date) 41c1010edaSGreg Roach { 4259f2f229SGreg Roach $this->calendar = new GregorianCalendar(); 43a25f0a04SGreg Roach parent::__construct($date); 44a25f0a04SGreg Roach } 45a25f0a04SGreg Roach} 46