Home Features Docs Blog Support GitHub

SimpleDateFormat not working in 2.0.0-alpha-1


(Mikis Wöhrmann) #1

I am using a SimpleDateFormat to format a date for display. On Android it works fine, but calling the method on Apple causes the app to crash.

public String getDateForDisplay()
{
    Date date = de.airdevelopments.webuntisapi.Utils.getDate(getClientRequest());

    SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy", Locale.US);

    if(date != null) {
        String ss = sdf.format(date); //This line is causing the crash
        return ss;
    }
    return "Heute";
}

I get no exception or other crash report so I have no idea what is happening. Does anyone know something about this, has used it?

It’s on 2.0.0-alpha-1.

Tested it, on 1.3 it works just fine. Another 2.0.0-alpha-1 bug.