Skip to content

Instantly share code, notes, and snippets.

@V-Abhilash-1999
Created October 30, 2023 16:12
Show Gist options
  • Save V-Abhilash-1999/d7fdb48843ea37181537ce36f076f244 to your computer and use it in GitHub Desktop.
Save V-Abhilash-1999/d7fdb48843ea37181537ce36f076f244 to your computer and use it in GitHub Desktop.
Current Month Index
val startIndex = remember(currentSelectedDate) {
val year = currentSelectedDate.get(Calendar.YEAR)
val month = currentSelectedDate.get(Calendar.MONTH)
((year - startYear) * 12) + month
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment