If you would like to figure out week number in the month of your business date by using JodaTime in Java, please check below code snippet
Examples
- Week number in the month for business date of 2020-10-07 is 2
- Week number in the month for business date of 2020-10-21 is 4
LocalDate firstDayOfTheMonth = businessDate.dayOfMonth().withMinimumValue(); int weekOfMonth = Weeks.weeksBetween(firstDayOfTheMonth, businessDate.dayOfWeek().withMaximumValue().plusDays(1)).getWeeks();
JodaTime - week number of business date
2020-11-12T19:27:00Z
GarciaPL
Java|Java 8|JodaTime|