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
This commit is contained in:
14
lib/fun_getDatesInRange.ts
Normal file
14
lib/fun_getDatesInRange.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user