import java.util.*; import java.text.*; import java.io.*; public class DateFormatTestAR{ public static void main(String[] args) throws IOException { PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out, "UTF-8")); Locale locale = new Locale("ar","EG"); SimpleDateFormat sdf = new SimpleDateFormat("GGGG yyyy-MM-dd", locale); out.println(sdf.format(new Date())); sdf = new SimpleDateFormat("GGGG yyyy-MM-dd"); out.println(sdf.format(new Date())); out.close(); } }