有人知道如何从DateTime中提取星期几的缩写名称吗?
不:
DateTime date = DateTime.now();
String dateFormat = DateFormat('dd-MM-yyyy hh:mm').format(date);
结果->星期五
使用“ E”作为日期模式(ABBR_WEEKDAY模式)
DateFormat(DateFormat.ABBR_WEEKDAY).format(date);
检查此以获取更多信息:https : //docs.flutter.io/flutter/intl/DateFormat-class.html
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句