A local-first personal finance app
Remove comma from all instances of month-year strings (#6748)
Tyler Durrc57260a5047c
diff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.pngindex 7fa8a9a7ae..47689e8aa8 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.pngindex afeea29255..e66a7b82c4 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.pngindex 3ebdc26edb..fb8e423977 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-cash-flow-graph-and-checks-visuals-3-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-1-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-1-chromium-linux.pngindex 0429001505..789c351afe 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-1-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-1-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-2-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-2-chromium-linux.pngindex 5202741042..281babe2d3 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-2-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-2-chromium-linux.png differdiff --git a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-3-chromium-linux.png b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-3-chromium-linux.pngindex 3648f581e4..a81e9785f8 100644Binary files a/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-3-chromium-linux.png and b/packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-loads-net-worth-graph-and-checks-visuals-3-chromium-linux.png differdiff --git a/packages/desktop-client/src/components/formula/QueryManager.tsx b/packages/desktop-client/src/components/formula/QueryManager.tsxindex 4658cdff7e..f696ba3b64 100644--- a/packages/desktop-client/src/components/formula/QueryManager.tsx+++ b/packages/desktop-client/src/components/formula/QueryManager.tsx@@ -36,6 +36,7 @@ import {validateStart,} from '@desktop-client/components/reports/reportRanges';import { fromDateRepr } from '@desktop-client/components/reports/util';+import { useLocale } from '@desktop-client/hooks/useLocale';import { useRuleConditionFilters } from '@desktop-client/hooks/useRuleConditionFilters';import { addNotification } from '@desktop-client/notifications/notificationsSlice';import { useDispatch } from '@desktop-client/redux';@@ -207,6 +208,7 @@ function QueryItem({onUpdate,onRemove,}: QueryItemProps) {+ const locale = useLocale();const { t } = useTranslation();const [importJsonText, setImportJsonText] = useState('');const dispatch = useDispatch<AppDispatch>();@@ -293,14 +295,14 @@ function QueryItem({.rangeInclusive(earliestMonth, latestMonth).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy'),+ pretty: monthUtils.format(month, 'MMMM yyyy', locale),})).reverse();setAllMonths(allMonths);}run();- }, []);+ }, [locale]);const filters = useRuleConditionFilters(conditionsRef.current,diff --git a/packages/desktop-client/src/components/reports/Header.tsx b/packages/desktop-client/src/components/reports/Header.tsxindex 520518b75a..2b5c330da5 100644--- a/packages/desktop-client/src/components/reports/Header.tsx+++ b/packages/desktop-client/src/components/reports/Header.tsx@@ -153,7 +153,7 @@ export function Header({)}value={start}- defaultLabel={monthUtils.format(start, 'MMMM, yyyy', locale)}+ defaultLabel={monthUtils.format(start, 'MMMM yyyy', locale)}options={allMonths.map(({ name, pretty }) => [name, pretty])}/><View>{t('to')}</View>diff --git a/packages/desktop-client/src/components/reports/reports/Calendar.tsx b/packages/desktop-client/src/components/reports/reports/Calendar.tsxindex 41ac9ec091..1e6fc0de82 100644--- a/packages/desktop-client/src/components/reports/reports/Calendar.tsx+++ b/packages/desktop-client/src/components/reports/reports/Calendar.tsx@@ -297,7 +297,7 @@ function CalendarInner({ widget, parameters }: CalendarInnerProps) {.rangeInclusive(earliestMonth, latestMonth).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy', locale),+ pretty: monthUtils.format(month, 'MMMM yyyy', locale),})).reverse();diff --git a/packages/desktop-client/src/components/reports/reports/CashFlow.tsx b/packages/desktop-client/src/components/reports/reports/CashFlow.tsxindex 53d617bdbf..ce469db120 100644--- a/packages/desktop-client/src/components/reports/reports/CashFlow.tsx+++ b/packages/desktop-client/src/components/reports/reports/CashFlow.tsx@@ -156,7 +156,7 @@ function CashFlowInner({ widget }: CashFlowInnerProps) {.rangeInclusive(earliestMonth, latestMonth).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy', locale),+ pretty: monthUtils.format(month, 'MMMM yyyy', locale),})).reverse();diff --git a/packages/desktop-client/src/components/reports/reports/Crossover.tsx b/packages/desktop-client/src/components/reports/reports/Crossover.tsxindex 1c5f4a5031..7e3bb408c0 100644--- a/packages/desktop-client/src/components/reports/reports/Crossover.tsx+++ b/packages/desktop-client/src/components/reports/reports/Crossover.tsx@@ -45,6 +45,7 @@ import { useReport } from '@desktop-client/components/reports/useReport';import { useAccounts } from '@desktop-client/hooks/useAccounts';import { useCategories } from '@desktop-client/hooks/useCategories';import { useFormat } from '@desktop-client/hooks/useFormat';+import { useLocale } from '@desktop-client/hooks/useLocale';import { useNavigate } from '@desktop-client/hooks/useNavigate';import { type useSpreadsheet } from '@desktop-client/hooks/useSpreadsheet';import { useWidget } from '@desktop-client/hooks/useWidget';@@ -98,6 +99,7 @@ export function Crossover() {type CrossoverInnerProps = { widget?: CrossoverWidget };function CrossoverInner({ widget }: CrossoverInnerProps) {+ const locale = useLocale();const { t } = useTranslation();const dispatch = useDispatch();const accounts = useAccounts();@@ -206,14 +208,14 @@ function CrossoverInner({ widget }: CrossoverInnerProps) {.rangeInclusive(earliestDate, latestDate).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy'),+ pretty: monthUtils.format(month, 'MMMM yyyy', locale),})).reverse();setAllMonths(allMonths);}run();- }, []);+ }, [locale]);useEffect(() => {if (latestTransaction && allMonths?.length) {diff --git a/packages/desktop-client/src/components/reports/reports/CrossoverCard.tsx b/packages/desktop-client/src/components/reports/reports/CrossoverCard.tsxindex 348e4e67a5..aaecb78cdf 100644--- a/packages/desktop-client/src/components/reports/reports/CrossoverCard.tsx+++ b/packages/desktop-client/src/components/reports/reports/CrossoverCard.tsx@@ -24,6 +24,7 @@ import { createCrossoverSpreadsheet } from '@desktop-client/components/reports/simport { useReport } from '@desktop-client/components/reports/useReport';import { useWidgetCopyMenu } from '@desktop-client/components/reports/useWidgetCopyMenu';import { useFormat } from '@desktop-client/hooks/useFormat';+import { useLocale } from '@desktop-client/hooks/useLocale';// Type for the return value of the recalculate functiontype CrossoverData = {@@ -68,6 +69,7 @@ export function CrossoverCard({onRemove,onCopy,}: CrossoverCardProps) {+ const locale = useLocale();const { t } = useTranslation();const { isNarrowWidth } = useResponsive();@@ -102,7 +104,7 @@ export function CrossoverCard({.rangeInclusive(earliestDate, latestDate).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy'),+ pretty: monthUtils.format(month, 'MMMM yyyy', locale),})).reverse();@@ -152,7 +154,7 @@ export function CrossoverCard({return () => {isMounted = false;};- }, [meta?.timeFrame]);+ }, [meta?.timeFrame, locale]);const [isCardHovered, setIsCardHovered] = useState(false);const onCardHover = useCallback(() => setIsCardHovered(true), []);diff --git a/packages/desktop-client/src/components/reports/reports/NetWorth.tsx b/packages/desktop-client/src/components/reports/reports/NetWorth.tsxindex a430e33cab..8cdf3d66f2 100644--- a/packages/desktop-client/src/components/reports/reports/NetWorth.tsx+++ b/packages/desktop-client/src/components/reports/reports/NetWorth.tsx@@ -197,7 +197,7 @@ function NetWorthInner({ widget }: NetWorthInnerProps) {.rangeInclusive(earliestMonth, latestMonth).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy', locale),+ pretty: monthUtils.format(month, 'MMMM yyyy', locale),})).reverse();diff --git a/packages/desktop-client/src/components/reports/reports/Spending.tsx b/packages/desktop-client/src/components/reports/reports/Spending.tsxindex e35c4fa620..9d488a3d3a 100644--- a/packages/desktop-client/src/components/reports/reports/Spending.tsx+++ b/packages/desktop-client/src/components/reports/reports/Spending.tsx@@ -128,7 +128,7 @@ function SpendingInternal({ widget }: SpendingInternalProps) {.rangeInclusive(earliestMonth, latestMonth).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy', locale),+ pretty: monthUtils.format(month, 'MMMM yyyy', locale),})).reverse();@@ -470,14 +470,14 @@ function SpendingInternal({ widget }: SpendingInternalProps) {<View><LegendItemcolor={theme.reportsGreen}- label={monthUtils.format(compare, 'MMM, yyyy', locale)}+ label={monthUtils.format(compare, 'MMM yyyy', locale)}style={{ padding: 0, paddingBottom: 10 }}/><LegendItemcolor={theme.reportsGray}label={reportMode === 'single-month'- ? monthUtils.format(compareTo, 'MMM, yyyy', locale)+ ? monthUtils.format(compareTo, 'MMM yyyy', locale): reportMode === 'budget'? t('Budgeted'): t('Average')@@ -502,14 +502,14 @@ function SpendingInternal({ widget }: SpendingInternalProps) {? t('Spent {{monthYearFormatted}} MTD', {monthYearFormatted: monthUtils.format(compare,- 'MMM, yyyy',+ 'MMM yyyy',locale,),})- : t('Spent {{monthYearFormatted}}:', {+ : t('Spent {{monthYearFormatted}}', {monthYearFormatted: monthUtils.format(compare,- 'MMM, yyyy',+ 'MMM yyyy',locale,),})}@@ -537,14 +537,14 @@ function SpendingInternal({ widget }: SpendingInternalProps) {? t('Spent {{monthYearFormatted}} MTD:', {monthYearFormatted: monthUtils.format(compareTo,- 'MMM, yyyy',+ 'MMM yyyy',locale,),}): t('Spent {{monthYearFormatted}}:', {monthYearFormatted: monthUtils.format(compareTo,- 'MMM, yyyy',+ 'MMM yyyy',locale,),})}@@ -598,13 +598,15 @@ function SpendingInternal({ widget }: SpendingInternalProps) {? t('Spent Average {{monthYearFormatted}} MTD:', {monthYearFormatted: monthUtils.format(compare,- 'MMM, yyyy',+ 'MMM yyyy',+ locale,),}): t('Spent Average {{monthYearFormatted}}:', {monthYearFormatted: monthUtils.format(compare,- 'MMM, yyyy',+ 'MMM yyyy',+ locale,),})}</Block>diff --git a/packages/desktop-client/src/components/reports/reports/Summary.tsx b/packages/desktop-client/src/components/reports/reports/Summary.tsxindex 44157efd67..aeb3496023 100644--- a/packages/desktop-client/src/components/reports/reports/Summary.tsx+++ b/packages/desktop-client/src/components/reports/reports/Summary.tsx@@ -202,7 +202,7 @@ function SummaryInner({ widget }: SummaryInnerProps) {.rangeInclusive(earliestMonth, latestMonth).map(month => ({name: month,- pretty: monthUtils.format(month, 'MMMM, yyyy', locale),+ pretty: monthUtils.format(month, 'MMMM yyyy', locale),})).reverse();diff --git a/upcoming-release-notes/6748.md b/upcoming-release-notes/6748.mdnew file mode 100644index 0000000000..394048ebd5--- /dev/null+++ b/upcoming-release-notes/6748.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [TDurrr1]+---++Month-year dates are now correctly formatted without a comma, e.g., "January 2026" instead of "January, 2026"