Modified the way to format date in Navbar.