Skip to content

Instantly share code, notes, and snippets.

@swilcox
Created September 19, 2011 18:36
Show Gist options
  • Save swilcox/1227219 to your computer and use it in GitHub Desktop.
Save swilcox/1227219 to your computer and use it in GitHub Desktop.
python code to convert a standard date to a clarion date
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