Skip to content

Instantly share code, notes, and snippets.

@mark-lumbao
Created March 7, 2022 12:38
Show Gist options
  • Save mark-lumbao/05db7dd0bf2ce998a526b04497317f01 to your computer and use it in GitHub Desktop.
Save mark-lumbao/05db7dd0bf2ce998a526b04497317f01 to your computer and use it in GitHub Desktop.
Date difference calculator
#!/bin/env bash
##############################
# Date Difference Calculator #
# Dependency: nodejs #
##############################
echo "console.log(Math.round((new Date('$2').getTime() - new Date('$1')) / 86400000), 'days')" | node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment