- Make sure you have lts node.js running on your hardware at least support
es5
features likeexports
andrequire
- Also make sure you've run
npm install
to install all testing dependencies and the command line library
npm test
- Run
npm link
to create a symbolic link to/usr/local/bin/date-diff
(this might require root permission to execute) date-diff diff <first_date> <second_date> -f <optional_date_format>
- Date formats (
src/formats.js
) can be extended to support more formats, currently only support (y-m-d, d/m/y, d-m-y) - The regular expression made for the date format validation can be more precise