Fixed the pretty date function