Skip to content

Instantly share code, notes, and snippets.

@s1monw1
Created September 16, 2022 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s1monw1/d70cf039d54e4d2e2d0c8e245399d84f to your computer and use it in GitHub Desktop.
Save s1monw1/d70cf039d54e4d2e2d0c8e245399d84f to your computer and use it in GitHub Desktop.
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