Skip to content

Commit 92ca1ff

Browse files
committed
Always show year in expense record dates
- Update formatDateLabel to always include year for historical context - Keep 'Today' and 'Yesterday' labels for current/recent dates - Display all other dates as '2025年1月10日' format with year - Provide consistent temporal context across all expense records
1 parent 1c191e7 commit 92ca1ff

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/ExpenseList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ const formatDateLabel = (dateString: string): string => {
179179
} else if (compareDate.getTime() === compareYesterday.getTime()) {
180180
return '昨天'
181181
} else {
182-
return date.toLocaleDateString('zh-CN', { month: 'long', day: 'numeric' })
182+
// Always show year for all other dates
183+
return date.toLocaleDateString('zh-CN', { year: 'numeric', month: 'long', day: 'numeric' })
183184
}
184185
}
185186

0 commit comments

Comments
 (0)