I want to get the custom start and end day of week from current date. For example
If current date is 10/01/2022 and my start of the week start form Wednesday then I want to get a week range between 29/12/2021 to 04/01/2022. Till now I have Monday as start of the week and Sunday as the end of the week. For that I am using below code to get the week range. How Can I get the custom week range?
const date = new Date();
const start = dateFNS.sub(dateFNS.startOfWeek(date, { weekStartsOn: 1 }), { days: 7 });
const end = dateFNS.sub(dateFNS.endOfWeek(date, { weekStartsOn: 1 }), { days: 7 });