Format Month in MMMM format like January, February etc in Java
Description
The following code shows how to format Month in MMMM format like January, February etc.
Example
/*w w w.ja va2 s . c o m*/
import java.text.SimpleDateFormat;
import java.util.Date;
public class Main {
public static void main(String[] args) {
Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("MMMM");
System.out.println("Current Month in MMMM format : " + sdf.format(date));
}
}
The code above generates the following result.