fix(analysis): only skip inflation for current month, not last complete month
The last complete month's inflation is usually available by the 14th of the current month. Previously July was always skipped even though data exists.
This commit is contained in:
@@ -160,7 +160,12 @@ export function MonthlyVariationTable() {
|
||||
);
|
||||
|
||||
let inflation: number | null = null;
|
||||
if (month !== currentMonth && month !== lastCompleteMonth) {
|
||||
const dayOfMonth = today.getDate();
|
||||
const skipLastComplete = dayOfMonth < 14;
|
||||
if (
|
||||
month !== currentMonth &&
|
||||
!(skipLastComplete && month === lastCompleteMonth)
|
||||
) {
|
||||
inflation = inflationMap.get(month) ?? null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user