How to determine hijri dates?

Can someone tell a good way to determine what date the String is in Hijri format? Any good solution that automatically detects String (Hijri) string type?

Initial work or thought: We can verify that the year begins with 14 or 13 years, etc., since the years of the Hijri are, for example, “1435.”

I know the Java JODA API for converting in both directions:

//Convert Georgian to Hijri

DateTime dtISO = new DateTime(2014,2,25,0,0,0,0);
DateTime dtIslamic = dtISO.withChronology(IslamicChronology.getInstance());
String formatIslamic= "dd-MMMM-yyyy";
DateTimeFormatter formatter = DateTimeFormat.forPattern(formatIslamic).withChronology( IslamicChronology.getInstance());
String islamicDateString = formatter.print(dtIslamic);
System.out.println(islamicDateString);

//Convert Hijri to Georgian :

Chronology iso = ISOChronology.getInstanceUTC();
Chronology hijri = IslamicChronology.getInstanceUTC();
DateTime dtHijri = new DateTime(1435,04,24,00,00,hijri); 
DateTime dtIso = new DateTime(dtHijri, iso);
System.out.println(dtIso);
+4
source share
1 answer

, - . , , , . //. , 2- 2- , , ... 1492 , 1492 - 2069 -.

, , . , , , . , - 2016, , , 2016 2577 . , .

? 2016 1437 ( 579 ) , , , . , , , , .

+6

Source: https://habr.com/ru/post/1624976/


All Articles