[CalendarServer-changes] [14576] PyCalendar/trunk/src/pycalendar/datetime.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Mar 12 11:29:57 PDT 2015
Revision: 14576
http://trac.calendarserver.org//changeset/14576
Author: sagen at apple.com
Date: 2015-03-12 11:29:56 -0700 (Thu, 12 Mar 2015)
Log Message:
-----------
Fix collision in 'locale'
Modified Paths:
--------------
PyCalendar/trunk/src/pycalendar/datetime.py
Modified: PyCalendar/trunk/src/pycalendar/datetime.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/datetime.py 2015-03-12 16:57:43 UTC (rev 14575)
+++ PyCalendar/trunk/src/pycalendar/datetime.py 2015-03-12 18:29:56 UTC (rev 14576)
@@ -845,11 +845,11 @@
self.changed()
- def getLocaleDate(self, locale):
+ def getLocaleDate(self, dateTimeFormat):
buf = StringIO.StringIO()
- if locale == DateTime.FULLDATE:
+ if dateTimeFormat == DateTime.FULLDATE:
buf.write(locale.getDay(self.getDayOfWeek(), locale.LONG))
buf.write(", ")
buf.write(locale.getMonth(self.mMonth, locale.LONG))
@@ -857,7 +857,7 @@
buf.write(str(self.mDay))
buf.write(", ")
buf.write(str(self.mYear))
- elif locale == DateTime.ABBREVDATE:
+ elif dateTimeFormat == DateTime.ABBREVDATE:
buf.write(locale.getDay(self.getDayOfWeek(), locale.SHORT))
buf.write(", ")
buf.write(locale.getMonth(self.mMonth, locale.SHORT))
@@ -865,25 +865,25 @@
buf.write(str(self.mDay))
buf.write(", ")
buf.write(str(self.mYear))
- elif locale == DateTime.NUMERICDATE:
+ elif dateTimeFormat == DateTime.NUMERICDATE:
buf.write(str(self.mMonth))
buf.write("/")
buf.write(str(self.mDay))
buf.write("/")
buf.write(str(self.mYear))
- elif locale == DateTime.FULLDATENOYEAR:
+ elif dateTimeFormat == DateTime.FULLDATENOYEAR:
buf.write(locale.getDay(self.getDayOfWeek(), locale.LONG))
buf.write(", ")
buf.write(locale.getMonth(self.mMonth, locale.LONG))
buf.write(" ")
buf.write(str(self.mDay))
- elif locale == DateTime.ABBREVDATENOYEAR:
+ elif dateTimeFormat == DateTime.ABBREVDATENOYEAR:
buf.write(locale.getDay(self. getDayOfWeek(), locale.SHORT))
buf.write(", ")
buf.write(locale.getMonth(self.mMonth, locale.SHORT))
buf.write(" ")
buf.write(str(self.mDay))
- elif locale == DateTime.NUMERICDATENOYEAR:
+ elif dateTimeFormat == DateTime.NUMERICDATENOYEAR:
buf.write(str(self.mMonth))
buf.write("/")
buf.write(str(self.mDay))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150312/98763e96/attachment-0001.html>
More information about the calendarserver-changes
mailing list