Skip to content

Instantly share code, notes, and snippets.

@thephez
Forked from strophy/dash_budget_payout_dates.sh
Last active November 4, 2021 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thephez/1bca32b4daf0b51518b636cf69bb1acc to your computer and use it in GitHub Desktop.
Save thephez/1bca32b4daf0b51518b636cf69bb1acc to your computer and use it in GitHub Desktop.
estimate future dash budget payout dates
#!/bin/bash
LAST_SB_DATE="2021-10-27T20:33:32+0000"
LAST_SB_HEIGHT=1561904
NEXT_SB_HEIGHT=1578520
SB_BLOCK_INTERVAL=16616
MONTHS_TO_PROJECT=24
D0=$(TZ=UTC date --date="$(date --date="$LAST_SB_DATE")");
for block in `seq $NEXT_SB_HEIGHT $SB_BLOCK_INTERVAL $(($LAST_SB_HEIGHT + ($SB_BLOCK_INTERVAL*$MONTHS_TO_PROJECT)))`;
do DD=$(TZ=UTC date --date="$(date --date="$D0") +727 hours +5 minutes +2 seconds");
D0=$DD;
echo "$block - $DD";
done
@thephez
Copy link
Author

thephez commented Nov 4, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment