Kotlin

Member

vivien_maggio

by vivien_maggio , in category: Kotlin , 2 months ago
no answers

Looks like parsing month in Kotlin 😗

1
2
3
4
5
6
7
8
9
private fun findFirstChecked(calendarModel: CalendarModel) =
        LocalDate.parse(
            "${calendarModel.year}-${
                calendarModel.months.indexOfFirst {
                    it.state is
                            CalendarMonthState.EnableType
                }.plus(1).toString().padStart(2, '0')
            }-01"
        )