Duvida por escrever por extenso mês,semana?

Olá,

estou tentando que saia por extenso o dia da semana , mês por extenso do pais
mas está dando erro.

Onde estou errando …


 Locale ptBR = new Locale("pt", "BR");

        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss"); 
        String diahoje ="29/11/1972 15:59:59";
	Date novodia =sdf.parse(diahoje);

	DateFormat timeFormat =  DateFormat.getDateInstance(DateFormat.DAY_OF_WEEK_FIELD,ptBR); 

	System.out.println(timeFormat.format(novodia));

erro :

Exception in thread "main" java.lang.IllegalArgumentException: Illegal date style 9
	at java.text.DateFormat.get(Unknown Source)
	at java.text.DateFormat.getDateInstance(Unknown Source)
	at br.com.raia.nfe.xml.Exemplo.main(Exemplo.java:75)

Tenho um metodo que retorno o dia da semana e o mes

Segue o codigo

public static String diaSemana(String dataDia) {
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");

		Date data = new Date();
		Calendar cal = null;
		try {
			data = formatter.parse(dataDia);
			cal = new GregorianCalendar(); 
			cal.setTime(data);

		} catch (ParseException e) {
			e.printStackTrace();
		} 
		return new DateFormatSymbols(Locale.getDefault()).getWeekdays()[cal.get(Calendar.DAY_OF_WEEK)];
	}


public static String mes(String dataDia) {
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");

		Date data = new Date();
		Calendar cal = null;
		try {
			data = formatter.parse(dataDia);
			cal = new GregorianCalendar(); 
			cal.setTime(data);

		} catch (ParseException e) {
			e.printStackTrace();
		} 
		return new DateFormatSymbols(Locale.getDefault()).getMonths()[cal.get(Calendar.MONTH)];
	}

Espero ter ajudado…

Olá,

na sei se essa é a melhor maneira mas deu certo se alguém tiver
um exemplo com menos linhas …

abs

Locale ptBR = new Locale("pt", "BR");
DateFormat m_parsingFormat = DateFormat.getDateInstance(DateFormat.FULL, ptBR);
        Calendar m_calendar = Calendar.getInstance();
        FieldPosition dayPos = new FieldPosition(DateFormat.DAY_OF_WEEK_FIELD);
        m_parsingFormat.format(m_calendar.getTime(), new StringBuffer(),dayPos);
        
        String ultimo =m_parsingFormat.format(m_calendar.getTime(), new StringBuffer(),monthPos).toString();
        System.out.println("diatodo="+ultimo);
        int spi = dayPos.getBeginIndex();
        int spf = dayPos.getEndIndex();
       
        System.out.println("semana="+ultimo.substring(spi,spf));