kotlin时间戳转对应时间格式有很简洁的语法糖,下面就一起了解一下吧:
比如说UI图需要这样的时间格式:
10月20日 10:24
data.createTime.toLong() formatBy "MM月dd日 HH:mm"
10-20 10:24
data.createTime.toLong() formatBy "MM-dd HH:mm"

kotlin时间戳转对应时间格式有很简洁的语法糖,下面就一起了解一下吧:
比如说UI图需要这样的时间格式:
10月20日 10:24
data.createTime.toLong() formatBy "MM月dd日 HH:mm"
10-20 10:24
data.createTime.toLong() formatBy "MM-dd HH:mm"