fix formatDatePosition
This commit is contained in:
parent
e8c830454a
commit
6ae4dcd7bf
1 changed files with 3 additions and 3 deletions
|
|
@ -1155,9 +1155,9 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
const d = parseInt(day);
|
||||
|
||||
const parts = [];
|
||||
if (y > 0) parts.push(`${y}ปี`);
|
||||
if (m > 0) parts.push(`${m}เดือน`);
|
||||
if (d > 0) parts.push(`${d}วัน`);
|
||||
if (y > 0) parts.push(`${y} ปี`);
|
||||
if (m > 0) parts.push(`${m} เดือน`);
|
||||
if (d > 0) parts.push(`${d} วัน`);
|
||||
|
||||
return parts.length > 0 ? parts.join(" ") : ""; // กรณีที่ทั้งหมดเป็น 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue