Fixes translateDate helper function