Handle the date parsing.

@param ParseDateEvent $event The event.

@return void
968818
public function handleParseDate($event)
    {
        if ($event->getResult() === null) {
            /** @var Date $dateAdapter */
            $dateAdapter = $this->framework->getAdapter(Date::class);
            $event->setResult($dateAdapter->parse($event->getFormat(), $event->getTimestamp()));
        }
    }
689948
public function onPreSerialize(ObjectEvent $event)
    {
        $configuredType = $event->getObject();

        if ($configuredType instanceof ConfiguredType) {
            try {
                $configurationArray = json_decode($configuredType->getConfiguration(), true);
                $extraFormType = $this->registry->getType($configurationArray['form_type']);
                $configuredType->setExtraFormType($extraFormType);
            } catch (\Exception $e) {
                return;
            }
        }
    }
955190
protected function execute($event)
    {
        foreach($this->events[$event] as $handler) {
            $this->listen($event, $handler);
        }
    }
95951
public function handleEvent(ActionEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        $environment = $event->getEnvironment();

        if (null === ($serializedId = $this->getModelId($environment))) {
            return;
        }

        $operation = $this->getOperation($event->getAction(), $environment);
        if (!($operation instanceof ToggleCommandInterface)) {
            return;
        }

        if (false === $this->checkPermission($event)) {
            $event->stopPropagation();

            return;
        }

        $this->process($environment, $operation, $serializedId);
    }
502759
public function onFind($event)
    {
        if ($this->isAttributeWriteable($event) && $this->onBeforeFind($event)) {
            if ($this->i18n) {
                $event->sender->setAttribute($this->name, $this->i18nDecodedGetActive($this->i18nFieldDecode($event->sender->getAttribute($this->name), $this->i18nEmptyValue)));
            }
            
            $this->onAfterFind($event);
        }
    }
476564
public function handleMetadataLoad(MetadataLoadEvent $event)
    {
        if (ArticlePageDocument::class !== $event->getMetadata()->getClass()
            && !is_subclass_of($event->getMetadata()->getClass(), ArticlePageDocument::class)
        ) {
            return;
        }

        $metadata = $event->getMetadata();
        $metadata->setSyncRemoveLive(false);
        $metadata->addFieldMapping(
            'pageTitle',
            [
                'encoding' => 'system_localized',
                'property' => 'suluPageTitle',
            ]
        );
    }
564525
protected function handle(Event $event): void
    {
        $method = 'apply'.ClassName::short($event);

        if (!method_exists($this, $method)) {
            return;
        }

        $this->$method($event);
    }
466034
@UiHandler("m_dateModifiedEndDateBox")
    protected void onDateModifiedEndChange(ValueChangeEvent<Date> event) {

        if (event.getValue() != null) {
            m_tabHandler.setDateModifiedEnd(event.getValue().getTime());
        } else {
            // if the field is empty take the max value
            m_tabHandler.setDateModifiedEnd(-1L);
        }
    }
1076275
private function parseDateFields()
    {
        if ('' === $this->getFromDate()) {
            $this->unsFromDate();
        }

        if ('' === $this->getToDate()) {
            $this->unsToDate();
        }

        foreach ([self::FROM_DATE, self::TO_DATE] as $dateField) {
            if ($this->hasData($dateField) && is_string($this->getData($dateField))) {
                $this->setData($dateField, $this->dateFilter->filter($this->getData($dateField)));
            }
        }
    }
667180
public function onPostDeserialize(ObjectEvent $event)
    {
        /** @var TargetGroupRuleInterface $targetGroupRule */
        $targetGroupRule = $event->getObject();

        if (!$targetGroupRule instanceof TargetGroupRuleInterface) {
            return;
        }

        if ($targetGroupRule->getConditions()) {
            foreach ($targetGroupRule->getConditions() as $condition) {
                $condition->setRule($targetGroupRule);
            }
        }
    }
277623
protected function handleError($event)
    {
        if (error_reporting() & $event->code) {
            $this->getSentryClient()->captureException(
                $this->createErrorException($event->message, $event->code, $event->file, $event->line)
            );
        }
        parent::handleError($event);
    }
172118
public function evaluateAttributes($event)
    {
        if (!empty($this->attributes[$event->name])) {
            $attributes = (array) $this->attributes[$event->name];
            foreach ($attributes as $attribute) {
                // ignore attribute names which are not string (e.g. when set by TimestampBehavior::updatedAtAttribute)
                if (is_string($attribute)) {
                    $value = $this->getValue($event, $attribute);
                    $this->owner->$attribute = $value;
                }
            }
        }
    }
1149237
public function handlePreRemove(RemoveEvent $event)
    {
        $document = $event->getDocument();

        if (!$this->supports($document)) {
            return;
        }

        $event = $this->getDeleteEvent($document);
        $this->deleteEvents[spl_object_hash($document)] = $event;
        $this->eventDispatcher->dispatch(
            ContentEvents::NODE_PRE_DELETE,
            $event
        );
    }
402953
public function parseText() : void
    {
        if (!count($this->stream->getTokens())) {
            return;
        }

        if ($this->accept(Token::T_TEXT)) {
            $this->insert(new TextNode($this->getCurrentToken()->getValue()));
            $this->advance();
        }
    }
544215
public function handle($event): void
    {
        $commentsService = app()->make('InetStudio\Comments\Contracts\Services\Back\CommentsServiceContract');

        $user = $event->user;

        $commentsService->getModel()::where([
            ['user_id', '=', 0],
            ['email', '=', $user->email],
        ])->update([
            'user_id' => $user->id,
            'name' => $user->name,
        ]);
    }
627424
function(event) {
		var date,
			inst = $.datepicker._getInst(event.target);

		if (inst.input.val() !== inst.lastVal) {
			try {
				date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
					(inst.input ? inst.input.val() : null),
					$.datepicker._getFormatConfig(inst));

				if (date) { // only if valid
					$.datepicker._setDateFromField(inst);
					$.datepicker._updateAlternate(inst);
					$.datepicker._updateDatepicker(inst);
				}
			}
			catch (err) {
			}
		}
		return true;
	}
524734
function parseDate(date) {
  if (isDateObject(date)) { // 1
    return date;
  } else if (isValidTimeStamp(date)) { // 2
    return new Date(date);
  } else if (typeof date === 'string' && /^[0-9]{4}([-\.\/][0-9]{2}){2}$/.test(date)) { // 3
    date = date.split(/[-\.\/]/);

    return new Date(date[0], date[1] - 1, date[2]);
  }
  
  return; // ??
}