fix an error with the all time date range for role stats.
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||
"format": "prettier --write src/",
|
||||
"dev": "npx tsc && node dist/app.js"
|
||||
"dev": "npx tsc && node dist/app.js",
|
||||
"build": "npx tsc"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
||||
@@ -26,7 +26,7 @@ function getYearNumber(monthId: number): number {
|
||||
}
|
||||
|
||||
function monthIdToStartSeconds(monthId: number): number {
|
||||
if (monthId) {
|
||||
if (monthId != -1) {
|
||||
const yearNumber = getYearNumber(monthId)
|
||||
const monthNumber = getMonthNumber(monthId)
|
||||
return new Date(yearNumber, monthNumber, 1).getTime() / 1000
|
||||
@@ -35,12 +35,12 @@ function monthIdToStartSeconds(monthId: number): number {
|
||||
}
|
||||
|
||||
function monthIdToEndSeconds(monthId: number): number {
|
||||
if (monthId) {
|
||||
if (monthId != -1) {
|
||||
const yearNumber = getYearNumber(monthId)
|
||||
const monthNumber = getMonthNumber(monthId)
|
||||
return new Date(yearNumber, monthNumber + 1, -1).getTime() / 1000
|
||||
}
|
||||
return 0
|
||||
return Number.MAX_SAFE_INTEGER
|
||||
}
|
||||
|
||||
export function addRushStatsApis(app, jsonParser) {
|
||||
|
||||
Reference in New Issue
Block a user