Files
mobile-darmasaba/lib/fun_getDatesInRange.ts
amaliadwiy 72fa18565d upd: fitur baru project
Deskripsi:
- tampilan list detail tugas project
- tampilan tambah detail tugas project
- tampilan edit detail tugas project
- tampilan form tambah data project > detail tugas
- integrasi api get list detail tugas project
- integrasi api tambah detail tugas project
- integrasi api edit detail tugas project
- integrasi api tambah data project > detail tugas

No Issues
2025-08-20 15:17:10 +08:00

14 lines
391 B
TypeScript

import dayjs from "dayjs";
export function getDatesInRange(startDate: string, endDate: string) {
const dates = [];
const currentDate = new Date(startDate);
const endDateNew = new Date(endDate);
while (currentDate <= endDateNew) {
dates.push(dayjs(new Date(currentDate)).format("DD-MM-YYYY"));
currentDate.setDate(currentDate.getDate() + 1);
}
return dates;
}