Add Duration To Date In Kotlin

[Solved] Add Duration To Date In Kotlin | Kotlin - Code Explorer | yomemimo.com
Question : add Duration to date in Kotlin

Answered by : funyinoluwa-kashimawo

Date.time.plus(Duration.ofDays(1).toMillis())

Source : https://funyinkash.com | Last Update : Fri, 10 Jun 22

Question : how to get time duration from file kotlin

Answered by : amir-je

// for android 10+
val uri = Uri.parse("full/path/to/file\ or /link/to/internet/resource")
var durationTime: Long
MediaPlayer.create(this, uri).also { durationTime = (it.duration / 1000).toLong() it.reset() it.release()
}

Source : | Last Update : Sat, 21 Nov 20

Answers related to add duration to date in kotlin

Code Explorer Popular Question For Kotlin