可选
__namedParameters: { 可选
first可选
weekconst getEnd = (date: string, options?: Parameters<typeof getEndOfWeek>[1]) => formatDate(getEndOfWeek(new Date(date), options));
// 星期一为星期第一天
getEnd('2023/04/19', { firstDay: 1 }); // '2023-04-23 00:00:00'
getEnd('2023/04/20', { firstDay: 1 }); // '2023-04-23 00:00:00'
getEnd('2023/04/16', { firstDay: 1 }); // '2023-04-16 00:00:00'
getEnd('2023/04/10', { firstDay: 1 }); // '2023-04-16 00:00:00'
// 星期天为星期第一天
getEnd('2023/04/19'); // '2023-04-22 00:00:00'
getEnd('2023/04/16'); // '2023-04-22 00:00:00'
getEnd('2023/04/09'); // '2023-04-15 00:00:00'
getEnd('2023/04/10'); // '2023-04-15 00:00:00'
getStartOfWeek
获取某日所在星期结束的date