Factor out and export Date function (parses and returns the value of the Date header)