Date function javascript

Updated the previous/next day functions