Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import java.util.Calendar
// ...
val date: Int = Calendar.getInstance().run {
set(Calendar.YEAR, 2030)
get(Calendar.DAY_OF_YEAR) //return value of run
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment