fix the month names were displayed incorrectly in the monthly income and expense trends chart when daylight saving time was involved (#392)

This commit is contained in:
MaysWind
2025-12-21 02:35:25 +08:00
parent d95e34a597
commit ece58b60ec
3 changed files with 31 additions and 23 deletions
+15 -14
View File
@@ -677,20 +677,20 @@ export const ALL_TRANSACTION_AMOUNTS_REQUEST_TYPE = [
export type TransactionAmountsRequestType = typeof ALL_TRANSACTION_AMOUNTS_REQUEST_TYPE[number];
export const LATEST_12MONTHS_TRANSACTION_AMOUNTS_REQUEST_TYPES: TransactionAmountsRequestType[] = [
'monthBeforeLast10Months',
'monthBeforeLast9Months',
'monthBeforeLast8Months',
'monthBeforeLast7Months',
'monthBeforeLast6Months',
'monthBeforeLast5Months',
'monthBeforeLast4Months',
'monthBeforeLast3Months',
'monthBeforeLast2Months',
'monthBeforeLastMonth',
'lastMonth',
'thisMonth'
];
export const LATEST_12MONTHS_TRANSACTION_AMOUNTS_REQUEST_TYPES: PartialRecord<TransactionAmountsRequestType, number> = {
'monthBeforeLast10Months': 11,
'monthBeforeLast9Months': 10,
'monthBeforeLast8Months': 9,
'monthBeforeLast7Months': 8,
'monthBeforeLast6Months': 7,
'monthBeforeLast5Months': 6,
'monthBeforeLast4Months': 5,
'monthBeforeLast3Months': 4,
'monthBeforeLast2Months': 3,
'monthBeforeLastMonth': 2,
'lastMonth': 1,
'thisMonth': 0
};
export interface TransactionAmountsRequestParams extends PartialRecord<TransactionAmountsRequestType, StartEndTime> {
readonly useTransactionTimezone: boolean;
@@ -1009,6 +1009,7 @@ export interface TransactionOverviewResponseItem {
export interface TransactionMonthlyIncomeAndExpenseData {
readonly monthStartTime: number;
readonly monthsBeforeCurrentMonth: number;
readonly incomeAmount: number;
readonly expenseAmount: number;
readonly incompleteIncomeAmount: boolean;