Update formatDate test to be more resilient. It wouldn't work when the client browser was in certain timezones