const today = new Date();

// Current date parts
const day = String(today.getDate()).padStart(2, '0');
const month = String(today.getMonth() + 1).padStart(2, '0');
const year = today.getFullYear();
const currentDate = `${day}/${month}/${year}`;

// Past years
const lastYear = year - 1;
const pastYearC = year - 10; // Child
const pastYearP = year - 30; // Parent

// Yesterday
const yesterdayObj = new Date(today);
yesterdayObj.setDate(today.getDate() - 1);
const yesterdayDay = String(yesterdayObj.getDate()).padStart(2, '0');
const yesterdayMonth = String(yesterdayObj.getMonth() + 1).padStart(2, '0');
const yesterdayYear = yesterdayObj.getFullYear();
const yesterdayDate = `${yesterdayDay}/${yesterdayMonth}/${yesterdayYear}`;

// Future Date  [Today + 5 days]
const futureObj = new Date(today);
futureObj.setDate(today.getDate() + 5);
const futureDay = String(futureObj.getDate()).padStart(2, '0');
const futureMonth = String(futureObj.getMonth() + 1).padStart(2, '0');
const futureYear = futureObj.getFullYear();
const futureDate = `${futureDay}/${futureMonth}/${futureYear}`;

// Past year dates
const lastYearDate = `${day}/${month}/${lastYear}`;
const pastYearDateC = `${day}/${month}/${pastYearC}`;
const pastYearDateP = `${day}/${month}/${pastYearP}`;

// Time calculations
const hours = String(today.getHours()).padStart(2, '0');
const minutes = String(today.getMinutes()).padStart(2, '0');
const minutesPlus3 = String(today.getMinutes() + 3).padStart(2, '0');
const hoursMinus1 = String(today.getHours() - 1).padStart(2, '0');
const currentTime = `${hours}:${minutes}`;
const testTime = `${hours}:${minutesPlus3}`;
const delayTime = `${hoursMinus1}:${minutes}`;

// Output
output.yesterdayDate = yesterdayDate;
output.futureDate = futureDate;
output.delayTime = delayTime;
output.currentDate = currentDate;
output.currentTime = currentTime;
output.testTime = testTime;
output.lastYearDate = lastYearDate;
output.pastYearDateC = pastYearDateC;
output.pastYearDateP = pastYearDateP;
