Skip to content

Commit

Permalink
fix: spanglish on date utils
Browse files Browse the repository at this point in the history
  • Loading branch information
nsdonato committed Jan 28, 2024
1 parent 08bd455 commit 7a571ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/date-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export const isToday = (date: Date) => {

// Show updated badge if updatedAt is within the last 3 days
export const isUpdated = (updatedAt: Date) => {
const fechaActual = new Date()
const today = new Date()

const fechaLimite = new Date(fechaActual)
fechaLimite.setDate(fechaActual.getDate() - 3)
const limitDate = new Date(today)
limitDate.setDate(today.getDate() - 3)

return updatedAt >= fechaLimite && updatedAt <= fechaActual
return updatedAt >= limitDate && updatedAt <= today
}

0 comments on commit 7a571ed

Please sign in to comment.