Skip to content

Instantly share code, notes, and snippets.

@BlogBlocks
Last active December 19, 2017 00:32
Show Gist options
  • Select an option

  • Save BlogBlocks/3fed772cee30cc00f616eb2f535a2952 to your computer and use it in GitHub Desktop.

Select an option

Save BlogBlocks/3fed772cee30cc00f616eb2f535a2952 to your computer and use it in GitHub Desktop.
#Date as year and Decimal
# USAGE: import Date_in_Dec
# Date_in_Dec.Today()
# Returns: 2017.896174863388
import time
def Today():
Date2Day = (float(time.strftime("%j"))-1) / 366 + float(time.strftime("%Y"))
return Date2Day
if __name__=="__main__":
Today()
@BlogBlocks
Copy link
Copy Markdown
Author

made public

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