Fix: Mongolian date format fallback to en-US
mn-MN locale is not supported in most browsers, causing dates to display in Korean format. Changed to use en-US for Mongolian users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,11 +56,12 @@ export default function FindMyCarPage() {
|
||||
loadVehicles();
|
||||
}, [user, language]);
|
||||
|
||||
// Format date
|
||||
// Format date (mn uses en-US as mn-MN is not supported in most browsers)
|
||||
const formatDate = (dateString: string | null | undefined) => {
|
||||
if (!dateString) return '-';
|
||||
const date = new Date(dateString);
|
||||
return date.toLocaleDateString(language === 'ko' ? 'ko-KR' : language === 'mn' ? 'mn-MN' : language === 'ru' ? 'ru-RU' : 'en-US', {
|
||||
const locale = language === 'ko' ? 'ko-KR' : language === 'ru' ? 'ru-RU' : 'en-US';
|
||||
return date.toLocaleDateString(locale, {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
|
||||
@@ -50,10 +50,11 @@ export default function MyRequestPage() {
|
||||
loadRequests();
|
||||
}, [user, language]);
|
||||
|
||||
// Format date
|
||||
// Format date (mn uses en-US as mn-MN is not supported in most browsers)
|
||||
const formatDate = (dateString: string) => {
|
||||
const date = new Date(dateString);
|
||||
return date.toLocaleDateString(language === 'ko' ? 'ko-KR' : language === 'mn' ? 'mn-MN' : language === 'ru' ? 'ru-RU' : 'en-US', {
|
||||
const locale = language === 'ko' ? 'ko-KR' : language === 'ru' ? 'ru-RU' : 'en-US';
|
||||
return date.toLocaleDateString(locale, {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
|
||||
Reference in New Issue
Block a user