Skip to content

Instantly share code, notes, and snippets.

@zodman
Created May 23, 2019 21:55
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 zodman/78c17cd72d33590a0927c66deb997ab7 to your computer and use it in GitHub Desktop.
Save zodman/78c17cd72d33590a0927c66deb997ab7 to your computer and use it in GitHub Desktop.
calculate days
import sys
import humanize
hrs = int(sys.argv[1])
days = round(hrs/8.0,1)
weeks = round(hrs/40.0,1)
month= round(days/20.0,1)
print("total days: {}".format( humanize.fractional(days)))
print("total weeks: {}".format(humanize.fractional(weeks)))
print("total month: {} or {}".format(humanize.fractional(month), month ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment