Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including scientific-diff with all npm packages installed. Try it out:

var scientificDiff = require("scientific-diff")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

scientific-diff v1.0.0

Counts the number of days between scientific experiments

scientific-diff

This module shows the number of days between scientific experiments.

Usage

CLI

$ npm i scientific-diff -g
$ scientific-diff 04/07/1984 25/12/1984

Programmatically

$ npm i scientific-diff
import scientificDiff from 'scientific-diff';
const result = scientificDiff('04/07/1984', '25/12/1984');
if (result !== undefined) console.log(result);

Known limitations

  • Dates between 01/01/1900 and 31/12/2999 are supported only.
  • Only the Gregorian is supported. Doesn't work for Julian and other calendars. E.g. in early 19xx years the Julian was still used in Bulgaria, Ottoman Empire, Russia, Greece etc. More info on Wikipedia.
  • Doesn't work properly for dates recorded in Samoa for ranges which include 30 December 2011.
  • Also this software assumes that Gregorian would still be the calendar of choice for both dates.
  • Could be something else. ¯\_(ツ)_/¯
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free