LANGUAGE » JAVASCRIPT » PACKAGE
Date-fns
Usage
js
import { addDays, subDays, format } from 'date-fns';
const now = new Date();
const tomorrow = addDays(now, 1)
const yesterday = subDays(now, 1)
const display = format(now, 'yyyy-MM-dd HH:mm:ss')