Skip to content

Commit

Permalink
Fix Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gevorgmansuryan committed Jan 13, 2025
1 parent 07615e7 commit dbdaf88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/forms/CalendarEntryForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ public function load($data, $formName = null)
$this->end_time = null;
}

$this->start_date = $this->normalizeFormattedDate($this->start_date);
$this->end_date = $this->normalizeFormattedDate($this->end_date);

$startDT = $this->getStartDateTime();
$endDt = $this->getEndDateTime();

Expand Down Expand Up @@ -573,7 +576,7 @@ private function normalizeFormattedDate($formattedDate)
* but IntlDateFormatter::parse() fails to handle it properly, causing a parsing error.
* To ensure successful parsing, we normalize the date string by removing 'г.'.
*/
if (Yii::$app->formatter->locale === 'bg') {
if (Yii::$app->formatter->locale == 'bg') {
return str_replace(' г.', '', $formattedDate);
}

Expand Down

0 comments on commit dbdaf88

Please sign in to comment.