Add day to dateStart format
dyb-tech.com/LaLiga-BackEnd/pipeline/head This commit looks good

This commit is contained in:
2024-07-25 01:02:21 +02:00
parent 58076dca4c
commit 25d3d7c12c
+2 -2
View File
@@ -39,7 +39,7 @@ class SeasonDto
'seasonNumber' => $this->seasonNumber ?? null,
'numberOfTeams' => $numberOfTeams,
'gamesPerWeek' => $this->gamesPerWeek ?? null,
'dateStart' => !empty($this->dateStart) ? $this->dateStart->format('Y-m'): null,
'dateStart' => !empty($this->dateStart) ? $this->dateStart->format('Y-m-d'): null,
'leagueId' => $this->leagueId ?? null,
'leagueName' => $this->leagueName ?? null,
'pointsPerWin' => $this->pointsPerWin ?? null,
@@ -57,7 +57,7 @@ class SeasonDto
}
if (!empty($dataList['dateStart']))
{
$dateStart = \DateTime::createFromFormat('Y-m', $dataList['dateStart']);
$dateStart = \DateTime::createFromFormat('Y-m-d', $dataList['dateStart']);
if ($dateStart)
{
$this->dateStart = $dateStart;