public static void setCalendarData ( Calendar calendar , Locale locale ) { int [ ] array = ( int [ ] ) localeData . get ( locale ) ; if ( array == null ) { Calendar c = Calendar . getInstance ( locale ) ; array = new int [ 2 ] ; array [ 0 ] = c . getFirstDayOfWeek ( ) ; array [ 1 ] = c . getMinimalDaysInFirstWeek ( ) ; localeData . putIfAbsent ( locale , array ) ; } calendar . setFirstDayOfWeek ( array [ 0 ] ) ; calendar . setMinimalDaysInFirstWeek ( array [ 1 ] ) ; }
Set the attributes of the given calendar from the given locale .