fix: #133 update LOCALE config to cover overall locales

Update LOCALE inside config.ts to include html lang value and datetime locale values. Updated respective files and blog post.

Closes: #133
This commit is contained in:
satnaing
2023-12-20 10:50:45 +06:30
parent c526157118
commit cd02b047d2
4 changed files with 14 additions and 7 deletions
+2 -2
View File
@@ -30,13 +30,13 @@ export default function Datetime({ datetime, size = "sm", className }: Props) {
const FormattedDatetime = ({ datetime }: { datetime: string | Date }) => {
const myDatetime = new Date(datetime);
const date = myDatetime.toLocaleDateString(LOCALE, {
const date = myDatetime.toLocaleDateString(LOCALE.langTag, {
year: "numeric",
month: "long",
day: "numeric",
});
const time = myDatetime.toLocaleTimeString(LOCALE, {
const time = myDatetime.toLocaleTimeString(LOCALE.langTag, {
hour: "2-digit",
minute: "2-digit",
});