Typescript Remove Last Character From String To Date