Change date variables to more appropriate type, fix #37