Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

date-fns: 1

node v10.24.1
version: master
endpointsharetweet
const intervalToDuration = require("date-fns/intervalToDuration"); const parseISO = require("date-fns/parseISO"); // ok const int1 = { start: parseISO('2020-05-01T00:00:00'), // Date end: parseISO('2020-07-01T00:00:00'), // Date }; const dur1 = intervalToDuration(int1); console.log(dur1); // Object {days: 0, hours: 0, minutes: 0, months: 2, seconds: 0, years: 0}
Loading…

no comments

    sign in to comment