Remove '일' suffix from Korean calendar day numbers
Modified formatDay function in both calendar components: - For Korean locale (ko), display only the day number (e.g., '10' instead of '10일') - For other locales, use default toLocaleString formatting Changes: - nice-calendar.tsx: Updated formatDay to check currentLocale === 'ko' - nice-calendar-month.tsx: Updated formatDay to check currentLocale === 'ko' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -77,6 +77,10 @@ const NiceCalendarMonth = ({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const formatDay = (locale: string | undefined, date: Date) => {
|
const formatDay = (locale: string | undefined, date: Date) => {
|
||||||
|
// For Korean locale, return only the day number without '일'
|
||||||
|
if (currentLocale === 'ko') {
|
||||||
|
return date.getDate().toString();
|
||||||
|
}
|
||||||
return date.toLocaleString(currentLocale, {
|
return date.toLocaleString(currentLocale, {
|
||||||
day: 'numeric'
|
day: 'numeric'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -83,6 +83,10 @@ const NiceCalendar = ({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const formatDay = (locale: string | undefined, date: Date) => {
|
const formatDay = (locale: string | undefined, date: Date) => {
|
||||||
|
// For Korean locale, return only the day number without '일'
|
||||||
|
if (currentLocale === 'ko') {
|
||||||
|
return date.getDate().toString();
|
||||||
|
}
|
||||||
return date.toLocaleString(currentLocale, {
|
return date.toLocaleString(currentLocale, {
|
||||||
day: 'numeric'
|
day: 'numeric'
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user