แก้ฟังก์ชั่น convert วัน

This commit is contained in:
Warunee Tamkoo 2024-02-05 16:31:36 +07:00
parent e8c7d7ff3d
commit dd0d89e7d1

View file

@ -1012,7 +1012,7 @@ export const useCounterMixin = defineStore("mixin", () => {
//Convert to an array and store
const calcFormat = calcFormatTmp.split("-");
//Subtract each member of our array from the default date
const days_passed = Number(Math.abs(Number(calcFormat[0])) - 1);
const days_passed = Number(Math.abs(Number(calcFormat[0])));
const months_passed = Number(Math.abs(Number(calcFormat[1])) - 1);
const years_passed = Number(Math.abs(Number(calcFormat[2])) - 1970);