$value]); Log::debug('Format: ', ['format' => $this->config['date-format']]); try { $date = Carbon::createFromFormat($this->config['date-format'], $value); } catch (InvalidArgumentException $e) { Log::critical($e->getMessage()); Log::critical('Cannot convert this string using the given format.', ['value' => $value, 'format' => $this->config['date-format']]); throw new FireflyException(sprintf('Cannot convert "%s" to a valid date using format "%s".', $value, $this->config['date-format'])); } Log::debug('Converted date', ['converted' => $date->toAtomString()]); $this->setCertainty(100); return $date; } }