mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-19 20:16:04 +08:00
Fix weekly leaderboard timestamp logic (#3780)
This commit is contained in:
parent
dcfc5702b4
commit
83cfd272a2
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue