this code runs fine on android and emulator  from my test it produces:
"dateTodayS: Fri Aug 31, dayName: Fri monthName: Aug, dayDate: 31, 

but on real ios it produces:

"dateTodayS: August 31, dayName: Aug monthName: st, dayDate: 1, 

I realise its just parsing different because of the result from parsing the 
date, but shouldnt it behave identically on all platforms?

_("DateStringHolder received "+stringDate);
        SimpleDateFormat dateTodaySDF = new SimpleDateFormat("yyyy-MM-dd");
        Date dateToday = null; //a date object representing the string they 
passed in
        try {
            dateToday   = dateTodaySDF.parse(stringDate);
            String dateTodayS = dateToday.toString();
            dayName    = dateTodayS.substring(0,3);
            monthName  = dateTodayS.substring(4,7);
            dayDate    = dateTodayS.substring(8,10);            
            monthNumber= stringDate.substring(5,7);
            //for testing differences on ios and android!
  "ios debug", "dateTodayS:"+dateTodayS+", 
dayName:"+dayName+", monthName:"+monthName+", dayDate:"+dayDate+", 
monthNumber:"+monthNumber, "OK", "Cancel");
        catch(Exception e)
            _("**warning** cant parse date! "+e.getMessage()+" 

You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
Visit this group at
To view this discussion on the web visit
For more options, visit

Reply via email to