1<?php 2 3namespace dokuwiki\Feed; 4 5use SimplePie\Item; 6use SimplePie\SimplePie; 7 8use function PHP81_BC\strftime; 9 10class FeedParserItem extends Item 11{ 12 /** 13 * replace strftime with PHP81_BC\strftime 14 * @inheritdoc 15 * phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps 16 */ 17 public function get_local_date($date_format = '%c') 18 { 19 if (!$date_format) { 20 return $this->sanitize($this->get_date(''), SimplePie::CONSTRUCT_TEXT); 21 } elseif (($date = $this->get_date('U')) !== null && $date !== false) { 22 return strftime($date_format, $date); 23 } 24 25 return null; 26 } 27} 28