run (non-extension)

val dayOfYear: Int = run { 
  val cal = Calendar.getInstance()
  cal.set(Calendar.YEAR, 2030)
  cal.get(Calendar.DAY_OF_YEAR)
}
Back Home Next