"We are looking for a way to get ""how many Wednesday of that month"" from the app side on kotlin."
kotlin
You will be implementing the TemporalAdjuster
(tutorial).
An example of a questionnaire is a built-in method called TemporalAdjusters.dayOfWeekInMonth()
.
import java.time.DayOfWeek
import java.time.LocalDate
import java.time.temporal.TemporalAdjusters
funmain(){
valbase=LocalDate.of (2021, 12, 3)
value=base.with (TemporalAdjusters.dayOfWeekInMonth(2,DayOfWeek.WEDNESDAY))
println(date)//2021-12-08
}
© 2024 OneMinuteCode. All rights reserved.