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

This commit is contained in:
Daniel Guzman 2024-07-25 01:02:21 +02:00
parent 58076dca4c
commit 25d3d7c12c
1 changed files with 2 additions and 2 deletions

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;