如何将像 '17-04-2020' 这样的 dd-MM-yyyy 格式的字符串转换为 dart/flutter 中的 DateTime 对象?
formatter = new DateFormat('dd-MM-YYYY');
formatter.parse(strDate);
Run Code Online (Sandbox Code Playgroud)
我尝试了上面的代码并收到错误:
Trying to read -YYYY from 17-04-2020 at position 10
Run Code Online (Sandbox Code Playgroud)