Created
September 19, 2011 18:36
-
-
Save swilcox/1227219 to your computer and use it in GitHub Desktop.
python code to convert a standard date to a clarion date
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
import datetime | |
CLARION_DAY_ZERO = datetime.date(1800,12,28) #this is the important date to work with! | |
def date_to_clarion_date(input_date): | |
""" | |
this is evil because I'm not checking jack... | |
""" | |
return (input_date - CLARION_DAY_ZERO).days | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment