Skip to content

Commit

Permalink
feat(src/helpers/format-data/index.js): adicionamos um timer no final…
Browse files Browse the repository at this point in the history
… do mapeamento adicionando as 3horas que faltavam, que o new Date nao tinha
  • Loading branch information
angeloneves19 committed Feb 5, 2024
1 parent b3c5ef5 commit fb51d98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/helpers/format-data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const endsOnSameDay = (workshop) =>
export const formatWorkshopDates = (workshop) => {
if (workshop && workshop.attributes && workshop.attributes.data_inicio && workshop.attributes.data_fim) {
return endsOnSameDay(workshop)
? formatDate(new Date(workshop.attributes?.data_inicio))
: `${formatDate(new Date(workshop.attributes?.data_inicio))}
> ${formatDate(new Date(workshop.attributes?.data_fim))}`
? formatDate(new Date(`${workshop.attributes?.data_inicio}T00:00:00-0300`))
: `${formatDate(new Date(`${workshop.attributes?.data_inicio}T00:00:00-0300`))}
> ${formatDate(new Date(`${workshop.attributes?.data_fim}T00:00:00-0300`))}`
}
}

0 comments on commit fb51d98

Please sign in to comment.