js hack to make the dates display correctly