Fix weekly leaderboard timestamp logic (#3780)

This commit is contained in:
Bruce Berrios 2022-11-29 05:33:58 -05:00 committed by GitHub
parent dcfc5702b4
commit 83cfd272a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,7 +206,7 @@ export function mapRange(
}
export function getStartOfWeekTimestamp(timestamp: number): number {
const date = new Date(timestamp);
const date = new Date(getStartOfDayTimestamp(timestamp));
const monday = date.getDate() - (date.getDay() || 7) + 1;
date.setDate(monday);