Last active
August 29, 2015 14:08
-
-
Save gsharp/1eeb182de83d784dd7b0 to your computer and use it in GitHub Desktop.
time to new year
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export epoch=$(($(date -j -f "%d-%B-%y" 01-JAN-15 +%s) - $(date +%s))); | |
printf "\n\nTime from now to new year! \n\n months: %s\n weeks: %s\n days: %s\n hours: %s\n minutes: %s\n" $(($epoch / 2629743)) $(($epoch / 604800)) $(expr $epoch / 86400) $(expr $epoch / 3600) $(($epoch / 60)); | |
unset epoch; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
output sample:
Time from now to new year! months: 2 weeks: 9 days: 64 hours: 1537 minutes: 92220