public function setCurrentFormat($currentFormat) {
        $allowedFormats = $this->getAllowedFormats();
        if(!in_array($currentFormat, $allowedFormats)) {
            throw new InvalidArgumentException('Invalid Date Format: ' . $currentFormat . ', expected: ' . implode(', ', $allowedFormats));
        }

        $allFormats = $this->getPreviousFormats();
        $allFormats[] = $this->getCurrentFormat();
        $this->setPreviousFormats($allFormats);

        $this->currentFormat = $currentFormat;
    }