Skip to content

Commit

Permalink
Merge pull request #435 from DerBasler/master
Browse files Browse the repository at this point in the history
fix: dateToUnix to preserve the date #434
  • Loading branch information
iM-GeeKy authored Dec 11, 2024
2 parents f42771c + 51382e6 commit fe12955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Date/dateUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function showWeekDay(
}

export function dateToUnix(d: Date): number {
return Math.round(d.getTime() / 1000)
return Math.trunc(d.getTime() / 1000)
}

export function addMonths(date: Date, count: number) {
Expand Down

0 comments on commit fe12955

Please sign in to comment.