Reputation: 9394
How to be able to know the date of a specific day in next month in java
for example if I enter Friday I need the output to be as following
Friday 9 Jun 2017 Friday 16 Jun 2017 Friday 23 Jun 2017 Friday 30 Jun 2017
Upvotes: 0
Views: 55
Reputation: 5232
LocalDate.of( 2017 , Month.JUNE , 9 )
.with( TemporalAdjusters.next( DayOfWeek.FRIDAY ) )
You can use java.time.LocalDate and java.time.TemporalAdjusters
For Android library to do this code, use the ThreeTenABP project, an adaptation of the ThreeTen-Backport project. See How to use ThreeTenABP.
Upvotes: 2