# README
DateDiff
DateDiff does one thing, and one thing well: calculate the absolute differences, in days, between two dates of the exact format YYYY-MM-DD
.
Usage
There are three ways to use datediff: a library, via the command line or as a server (either self-configured, or as a docker container).
Library
import (
"github.com/Jeadie/DateDiff/diff"
)
days, err := diff.AbsoluteDateDifference("2020-02-20", "2002-02-20")
if err == nil {
fmt.Printf("%d days\n", days)
}
Command Line
After installing (see install binary):
datediff cmp 2020-02-20 2002-02-20
Server
For running from binary, after installing (see install binary):
datediff server -p=8001
(WIP): Or the server can be run as a Docker container:
docker run ...
Installation
Binaries are available for all releases, here, built across OSs and architectures.
curl -OL https://github.com/Jeadie/DateDiff/releases/download/v0.0.2/datediff-v0.0.2-darwin-amd64.tar.gz
tar -xzf datediff-v0.0.2-darwin-amd64.tar.gz
# Binary can then be used as above, e.g.
./datediff cmp 2020-02-20 2002-02-20
# Packages
No description provided by the author
# Type aliases
No description provided by the author