Javascript to generate date from passed encoded string

GWT craziness.