Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SimpleDateFormat dateFormat = new SimpleDateFormat("MM");
- String monthNumber = dateFormat.format(data_ano.getTime());
- String monthName;
- switch (monthNumber) {
- case "01":
- monthName = "JANEIRO";
- break;
- case "02":
- monthName = "FEVEREIRO";
- break;
- case "03":
- monthName = "MARÇO";
- break;
- case "04":
- monthName = "ABRIL";
- break;
- case "05":
- monthName = "MAIO";
- break;
- case "06":
- monthName = "JUNHO";
- break;
- case "07":
- monthName = "JULHO";
- break;
- case "08":
- monthName = "AGOSTO";
- break;
- case "09":
- monthName = "SETEMBRO";
- break;
- case "10":
- monthName = "OUTUBRO";
- break;
- case "11":
- monthName = "NOVEMBRO";
- break;
- case "12":
- monthName = "DEZEMBRO";
- break;
- default:
- monthName = "";
- break;
- }
- mes.setText(monthName);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement