I am trying use Date Picker and on Select i want to display the date in the following format
[Month name] [date], [year]
final Calendar c = Calendar.getInstance();
mYear = c.get(Calendar.YEAR)-13;
mMonth = c.get(Calendar.MONTH);
mDay = c.get(Calendar.DAY_OF_MONTH);
that gives Month as a number. How to get the name of the month instead of number.
public static final String[] MONTHS = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
use an array and get the String by MONTHS[monthNumber]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With