moving relative date parsing to document ready function