fix an error with the all time date range for role stats.
This commit is contained in:
@@ -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