Merge refactor/i18n into develop
This commit is contained in:
parent
3da5bf9079
commit
c681b19e39
99 changed files with 2192 additions and 2987 deletions
|
|
@ -91,7 +91,7 @@ export function calculateAge(birthDate: Date | null | string) {
|
|||
const months = ageDate.getUTCMonth();
|
||||
const days = ageDate.getUTCDate() - 1;
|
||||
|
||||
if (locale.value === 'th-th') {
|
||||
if (locale.value === 'tha') {
|
||||
return `${years} ปี ${months !== 0 ? months + ' เดือน' : ''} ${days !== 0 ? days + ' วัน' : ''} `;
|
||||
} else {
|
||||
return `${years} years ${months !== 0 ? months + ' months' : ''} ${days !== 0 ? days + ' days' : ''} `;
|
||||
|
|
@ -113,7 +113,7 @@ export function parseAndFormatDate(
|
|||
if (value && value.toString().length === 10) {
|
||||
const [date, month, year] = value.toString().split('/');
|
||||
|
||||
if (locale === 'th-th') {
|
||||
if (locale === 'tha') {
|
||||
const adjustedYear = Number(year) - 543;
|
||||
return new Date(`${month}/${date}/${adjustedYear}T00:00.000Z`);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue