fix(blog): تاریخ/زمان مطالعه کارت‌ها در /en انگلیسی شد؛ کرسر فیلدهای تصویر دیگر به آخر متن نمی‌پرد (مقدار محلی با همگام‌سازی فوکوس‌آگاه)

This commit is contained in:
aramesh-site deploy
2026-10-07 12:30:28 +00:00
parent bef132f82f
commit 9dab4f929c
5 changed files with 54 additions and 21 deletions
+8
View File
@@ -97,3 +97,11 @@ export function toPublishedISO(value?: string | null): string | null {
})
return jalali.isValid ? toISODate(jalali) : null
}
/** تاریخ میلادی انگلیسی برای سایت /en — با محافظ مقادیر نامعتبر/خالی */
export function formatEnDate(value?: string | null): string {
if (!value) return ''
const date = new Date(value)
if (Number.isNaN(date.getTime())) return ''
return new Intl.DateTimeFormat('en-GB', { day: 'numeric', month: 'long', year: 'numeric' }).format(date)
}