diff --git a/src/commands/military/getDischargeInfo.js b/src/commands/military/getDischargeInfo.js index 2d856a2..3c4a71d 100644 --- a/src/commands/military/getDischargeInfo.js +++ b/src/commands/military/getDischargeInfo.js @@ -49,8 +49,8 @@ function getDischargeInfo(client, targetUserId, targetUserName, decimal, usedFul const totalDays = calculateDateDifference(startDate, endDate) + 1; const todayFormatted = formatDate(now); let daysServed = new Date(todayFormatted) < new Date(startDate) ? 0 : calculateDateDifference(startDate, todayFormatted) + 1; - daysServed = Math.min(daysServed, totalDays); const remainingDays = totalDays - daysServed; + daysServed = Math.min(daysServed, totalDays); const [sYearStr, sMonthStr, sDayStr] = startDate.split('-'); let pastMonths = calculateMonthDifference(sYearStr, sMonthStr, String(now.getFullYear()), String(now.getMonth() + 1)); if (sDayStr === '01') pastMonths++;