Date parsing in api and frontend