Get Month Name of java.time.chrono.HijrahDate instance

前端 未结 3 1371
野趣味
野趣味 2021-01-12 08:25
HijrahDate hd=HijrahChronology.INSTANCE.date(LocalDate.of(2014,11, 25));

If we have HijrahDate Instance , it is expected to have a met

3条回答
  •  生来不讨喜
    2021-01-12 08:58

    Since the main language of UmalQura is the arabic langugage, Developers & programmers who uses UmalQuraCalender want to display the month in arabic. Thus , we base on @assylias answer we can add the Locale object to print صفر instead of Safar

    System.out.println(DateTimeFormatter.ofPattern("MMMM").format(hd,new Locale("ar")));
    

提交回复
热议问题