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: 3

node v10.24.1
version: master
endpointsharetweet
const intervalToDuration = require("date-fns/intervalToDuration"); const parseISO = require("date-fns/parseISO"); const int3 = [ parseISO('2020-05-01T00:00:00'), parseISO('2020-07-01T00:00:00'), ]; Object.defineProperty( Array.prototype, 'start', { get: function() { return this[0]; }, }, ); Object.defineProperty( Array.prototype, 'end', { get: function() { return this[1]; }, }, ); // this is ok, too! const dur3 = intervalToDuration(int3); console.log(dur3);
Loading…

no comments

    sign in to comment