How to get date 1 year ago to today in Kotlin?

I want to get date from 1 year ago to today in Kotlin. Any suggestions..

This is what i am trying , see in the code

CODE

val c = Calendar.getInstance()

c.set(Calendar.YEAR,-1)

val df = SimpleDateFormat("dd/MM/yyyy")

var formattedDate = df.format(c.time)

println(formattedDate)...

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts