feat: disable one year limit when importing dates
addresses #8698gjh5u
This commit is contained in:
@@ -280,14 +280,14 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
protected function parseDates(\SimpleXMLElement $xmlDate, array $product): int
|
||||
{
|
||||
$dateCount = 0;
|
||||
$earliestDate = new \DateTimeImmutable('next year');
|
||||
// $earliestDate = new \DateTimeImmutable('next year');
|
||||
|
||||
foreach ($xmlDate->hotel as $xmlHotel) {
|
||||
// don't import dates starting later than one year from now
|
||||
$dateStart = \DateTime::createFromFormat('d.m.Y', (string) $xmlDate->attributes()['termin']);
|
||||
if ($dateStart > $earliestDate) {
|
||||
continue;
|
||||
}
|
||||
// $dateStart = \DateTime::createFromFormat('d.m.Y', (string) $xmlDate->attributes()['termin']);
|
||||
// if ($dateStart > $earliestDate) {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
$date = $this->createDateRecord($product, $xmlDate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user