calculate the python date correctly