Here you can find the source of formatarData(Calendar data)
public static String formatarData(Calendar data)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main { private static DateFormat dataSimples = new SimpleDateFormat("dd/MM/yyyy"); public static String formatarData(Calendar data) { return dataSimples.format(new Date(data.getTimeInMillis())); }/*from w ww . ja v a 2s . c o m*/ }