There is a call to some external system which returns a date in hijri. In Production env, we received it as `'30-02-1436'`.

Consider the snippet which converts the hijri to a gregorian date, but it fails to do so.

```
    public static String convertHijriToGregorianDate(String hijriDate){
        Chronology iso = ISOChronology.getInstanceUTC(); // get the ISO standard chronology which we follow now
        Chronology hijri = IslamicChronology.getInstanceUTC(); // the hijri based chronology
        //String hijriDate = "19-08-1435"; // example/format which is received as a parameter in the method from response

        if(null != hijriDate && !hijriDate.isEmpty()){
            String[] parts = hijriDate.trim().split("-"); // you will get an array of size 3 by splitting with regex '-'
            String hijriYear = parts[2];
            String hijriMonth = parts[1];
            String hijriDay = parts[0];

            // Construct the Local Date corresponding to the hijri chronology
            LocalDate todayHijri = new LocalDate(Integer.parseInt(hijriYear), Integer.parseInt(hijriMonth), Integer.parseInt(hijriDay), hijri);

            // Construct the Local Date corresponding to the iso chronology based on the hijri date
            LocalDate todayIso = new LocalDate(todayHijri.toDateTimeAtStartOfDay(), iso);
            return String.valueOf(todayIso);
        }
        return null;
    }

```

Please suggest as to what is wrong with the code. We are getting this issue in stacktrace-

> 
> org.joda.time.IllegalFieldValueException: Value 30 for dayOfMonth must
>  be in the range [1,29]
>  at org.joda.time.field.FieldUtils.verifyValueBounds(FieldUtils.java:252)
>  at org.joda.time.chrono.BasicChronology.getDateMidnightMillis(BasicChronology.java:632)
>  at org.joda.time.chrono.BasicChronology.getDateTimeMillis0(BasicChronology.java:186)
>  at org.joda.time.chrono.BasicChronology.getDateTimeMillis(BasicChronology.java:160)
>  at org.joda.time.chrono.LimitChronology.getDateTimeMillis(LimitChronology.java:177)
>  at org.joda.time.chrono.BasicChronology.getDateTimeMillis(BasicChronology.java:155)
>  at org.joda.time.LocalDate.(LocalDate.java:457)
> 
> 
> 

Joda time version used is `2.9.1`