check api endpoint has a format of YYYY-MM-DD. fixed #58