Last active
December 19, 2017 00:32
-
-
Save BlogBlocks/3fed772cee30cc00f616eb2f535a2952 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #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() |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
made public