public static String getXNextWeek ( String date , Integer x , Language language ) { NormalizationManager nm = NormalizationManager . getInstance ( language , false ) ; String date_no_W = date . replace ( "W" , "" ) ; SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy-w" ) ; String newDate = "" ; Calendar c = Calendar . getInstance ( ) ; try { c . setTime ( formatter . parse ( date_no_W ) ) ; c . add ( Calendar . WEEK_OF_YEAR , x ) ; c . getTime ( ) ; newDate = formatter . format ( c . getTime ( ) ) ; newDate = newDate . substring ( 0 , 4 ) + "-W" + nm . getFromNormNumber ( newDate . substring ( 5 ) ) ; } catch ( ParseException e ) { e . printStackTrace ( ) ; } return newDate ; }
get the x - next week of date