Skip to content

Instantly share code, notes, and snippets.

Last active February 21, 2022 22:02
What would you like to do?
import { add } from 'date-fns';
/** Add one day to a given input */
function tomorrow(date: Date) {
return add(date, { days: 1 });
const now = new Date('2022-04-03 00:00:00');
const next = tomorrow(now);
console.log(now.toLocaleString(), '--', next.toLocaleString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment