Glad mx.DateTime is going away! In did a brief review, notes below. I also commented on things that should probably be locale dependent formats - not something you would need to change before checkin, but if you could put in a comment next to those sections in the code that might be enough. I did not review the changes inside repository itself.
> Index: parcels/osaf/examples/zaobao/parcel.xml
> ===================================================================
> - <delay>00:00:30:00</delay>
> + <delay>0+1800.0</delay>
This looks unfortunate, I don't understand the new format. The old
format seems clearer.
> +from datetime import datetime
This is just a general note about from vs import. I think we determined
that import is better, so things like this would be better to write:
import datetime.datetime as datetime
> +from PyICU import GregorianCalendar, DateFormatSymbols
> +dateFormatSymbols = DateFormatSymbols()
This looks weird. Maybe python gurus can weigh in if this should be changed.
> + timeString = "%d:%s" %((time.hour % 12) or 12,
> + time.strftime("%M %p"))
Shouldn't the time format come from locale (24 vs 12 hours)?
> - monthText = selectedDate.Format("%B %Y")
> + monthText = "%s %d" %(months[selectedDate.month].toUnicode(),
> + selectedDate.year)
> else:
> - monthText = "%s - %s" % (startDate.Format("%B"),
> - lastDate.Format("%B %Y"))
> + monthText = "%s - %s %d" %(months[startDate.month].toUnicode(),
> + months[lastDate.month].toUnicode(),
> + lastDate.year)
I think this stuff might also be locale dependent (in which order to put
things in a date).
> - dayName = currentDate.Format('%a ') + str(currentDate.day)
> + dayName = "%s %02d" %(shortWeekDays[actualDay +
> 1].toUnicode(),
> + currentDate.day)
Locale dependent order, maybe.
> - dateTimeFormat = '%Y-%m-%d %I:%M %p'
> - dateFormat = '%Y-%m-%d'
> + #dateTimeFormat = '%Y-%m-%d %I:%M %p'
> + #dateFormat = '%Y-%m-%d'
> + #dateTimeFormatHint = 'yyyy-mm-dd HH:MM'
> + #dateFormatHint = 'yyyy-mm-dd'
> +
> + dateTimeFormat = 'yyyy-MM-dd hh:mm a'
> + dateFormat = 'yyyy-MM-dd'
> dateTimeFormatHint = 'yyyy-mm-dd HH:MM'
> dateFormatHint = 'yyyy-mm-dd'
Locale specific formats.
--
Heikki Toivonen
signature.asc
Description: OpenPGP digital signature
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "Dev" mailing list http://lists.osafoundation.org/mailman/listinfo/dev
