Java 8 Date API - Getting week of month throws UnsupportedTemporalTypeException: Unsupported field: DayOfWeek
  
 
     
     
             
                 
 
 
         
         6 
         
 
         
             1 
         
 
 
 
 
             
 
             
 
     
 
 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?      
 
         
             
                 java kotlin java-date 
             
         
 
     
         
             
  share | improve this question  
             
 
             
 
     
         asked 5 hours ago 
     
     
         
     
     
         series0ne 
         
             16.2k 25 98 183 
         
     
 
 
             
         
     
 
 
                 
     
 	    
             ...