I am trying to get the week of the current month like so:
YearMonth
.from(Instant.now().atZone(ZoneId.of("UTC")))
.get(WeekFields.ISO.weekOfMonth())
But this throws
java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: DayOfWeek
I can't seem to work out why I'm getting this exception, because I'm not doing anything with DayOfWeek. Any ideas?