Closed anastr closed 3 years ago
I have this code:
val dateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.US) dateFormat.calendar = UmmalquraCalendar() val calendar = UmmalquraCalendar() calendar.time = dateFormat.parse("30/02/1442")!! // This will result calendar dated "01/02/1442" ! assert(dateFormat.format(calendar.time) == "30/02/1442") // Wrong!
This happen only when dd is 30. It seems every time the day was 30 its parsing always 01.
dd
30
01
What I'm trying to do is parsing String date to Calendar object to pass it to HijriDatePickerDialog.
String
Calendar
HijriDatePickerDialog
moved to ummalqura-calendar issue
I have this code:
This happen only when
dd
is30
. It seems every time the day was30
its parsing always01
.What I'm trying to do is parsing
String
date toCalendar
object to pass it toHijriDatePickerDialog
.