This is my code :
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.text.SimpleDateFormat;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
SimpleDateFormat date = new SimpleDateFormat("dd-MMM-yyyy", new Locale("es","ar"));
System.out.println(date.format(new Date(2014-1900,0,1)));
}
}
The above code returns,
01-ene-2014
But, the month should be in sentence case, i.e Ene
Can anyone help me out how can I get 01-Ene-2014
without using substring?