ui phase 9

This commit is contained in:
hamid
2026-07-19 15:14:44 +03:30
parent 1ef4feb911
commit b638e25a0e
47 changed files with 2628 additions and 666 deletions
+9
View File
@@ -32,3 +32,12 @@ export function formatShamsiDateTime(iso: string | Date, locale: string = 'fa'):
minute: '2-digit',
});
}
/**
* Month + year only (Shamsi for `fa`, Gregorian for `en`), e.g. «تیر ۱۴۰۳» — doubles as a stable
* group key for a month-grouped timeline (two timestamps in the same calendar month always format
* to the same string), so callers can group directly on this without separate Jalali arithmetic.
*/
export function formatShamsiMonthYear(iso: string | Date, locale: string = 'fa'): string {
return formatShamsiDate(iso, locale, { year: 'numeric', month: 'long' });
}