date-fns: 2

node v10.24.1
version: master
endpointsharetweet
const intervalToDuration = require("date-fns/intervalToDuration"); const parseISO = require("date-fns/parseISO"); // this is also ok. const int2 = new class { get start() { return parseISO('2020-05-01T00:00:00'); } get end() { return parseISO('2020-07-01T00:00:00'); } }; const dur2 = intervalToDuration(int2); console.log(dur2);
Loading…

no comments

    sign in to comment