1a25f0a04SGreg Roach<?php 2a25f0a04SGreg Roach/** 3a25f0a04SGreg Roach * webtrees: online genealogy 4*8fcd0d32SGreg Roach * Copyright (C) 2019 webtrees development team 5a25f0a04SGreg Roach * This program is free software: you can redistribute it and/or modify 6a25f0a04SGreg Roach * it under the terms of the GNU General Public License as published by 7a25f0a04SGreg Roach * the Free Software Foundation, either version 3 of the License, or 8a25f0a04SGreg Roach * (at your option) any later version. 9a25f0a04SGreg Roach * This program is distributed in the hope that it will be useful, 10a25f0a04SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 11a25f0a04SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12a25f0a04SGreg Roach * GNU General Public License for more details. 13a25f0a04SGreg Roach * You should have received a copy of the GNU General Public License 14a25f0a04SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 15a25f0a04SGreg Roach */ 16e7f56f2aSGreg Roachdeclare(strict_types=1); 17e7f56f2aSGreg Roach 1876692c8bSGreg Roachnamespace Fisharebest\Webtrees\Date; 19a25f0a04SGreg Roach 20a25f0a04SGreg Roach/** 214a83f5d7SGreg Roach * Definitions for Roman dtes. 22a25f0a04SGreg Roach * 23a25f0a04SGreg Roach * The 5.5.1 gedcom spec mentions this calendar, but gives no details of 24a25f0a04SGreg Roach * how it is to be represented.... This class is just a place holder so that 25a25f0a04SGreg Roach * webtrees won’t compain if it receives one. 26a25f0a04SGreg Roach */ 27c1010edaSGreg Roachclass RomanDate extends JulianDate 28c1010edaSGreg Roach{ 294a83f5d7SGreg Roach // GEDCOM calendar escape 304a83f5d7SGreg Roach const ESCAPE = '@#DROMAN@'; 314a83f5d7SGreg Roach 32fe11e66dSGreg Roach /** 33fe11e66dSGreg Roach * Generate the %E format for a date. 34fe11e66dSGreg Roach * 35fe11e66dSGreg Roach * @return string 36fe11e66dSGreg Roach */ 37fe11e66dSGreg Roach protected function formatGedcomYear(): string 38c1010edaSGreg Roach { 394a83f5d7SGreg Roach return sprintf('%04dAUC', $this->year); 40a25f0a04SGreg Roach } 41a25f0a04SGreg Roach 42fe11e66dSGreg Roach /** 43fe11e66dSGreg Roach * Generate the %Y format for a date. 44fe11e66dSGreg Roach * 45fe11e66dSGreg Roach * @return string 46fe11e66dSGreg Roach */ 47fe11e66dSGreg Roach protected function formatLongYear(): string 48c1010edaSGreg Roach { 494a83f5d7SGreg Roach return $this->year . 'AUC'; 50a25f0a04SGreg Roach } 51a25f0a04SGreg Roach} 52