Fixes for date calculations around new year