6 lines
254 B
TypeScript
6 lines
254 B
TypeScript
export function nextDate(date: string) {
|
|
const [year, month, day] = date.split('-').map(Number);
|
|
const nextDay = new Date(Date.UTC(year, month - 1, day + 1));
|
|
const nextDateString = nextDay.toISOString().substring(0, 10);
|
|
return nextDateString;
|
|
} |