rework calc_serial

Using datetime.date objects now, as they have proven to lead to a cleaner implementation.