fix an error with the all time date range for role stats.

This commit is contained in:
iamBadgers
2024-06-08 23:07:20 -07:00
parent 9c87485d4e
commit 68433b6836
3 changed files with 7 additions and 5 deletions

View File

@@ -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) {