The Code A can convert a long value to date value, just like 2018.01.10
我希望得到日期+时间值,比如2018.01.10 23:11,我该如何处理Kotlin
我希望将当前时间转换为长时间值,我如何处理Kotlin
谢谢!
Code A个
fun Long.toDateString(dateFormat: Int = DateFormat.MEDIUM): String {
val df = DateFormat.getDateInstance(dateFormat, Locale.getDefault())
return df.format(this)
}