Parse, validate, manipulate, display dates in javascript