It is Bug 6736 and not bug 7036 :(
Bye,
Darshana
[email protected] wrote:
Revision
11998 <http://viewcvs.osafoundation.org/chandler?view=rev&rev=11998>
Author
jeffrey
Date
2006-10-12 09:34:54 -0700 (Thu, 12 Oct 2006)
Log Message
- Darshana's fix for bug 7036
<http://bugzilla.osafoundation.org/show_bug.cgi?id=7036>, improve
locale handling when parsing dates, r=pbossut,jeffrey
Modified Paths
* trunk/chandler/parcels/osaf/framework/attributeEditors/AttributeEditors.py
<#trunkchandlerparcelsosafframeworkattributeEditorsAttributeEditorspy>
Diff
Modified:
trunk/chandler/parcels/osaf/framework/attributeEditors/AttributeEditors.py
(11997 => 11998)
--- trunk/chandler/parcels/osaf/framework/attributeEditors/AttributeEditors.py
2006-10-12 16:32:22 UTC (rev 11997)
+++ trunk/chandler/parcels/osaf/framework/attributeEditors/AttributeEditors.py
2006-10-12 16:34:54 UTC (rev 11998)
@@ -46,8 +46,10 @@
from osaf import messages
import parsedatetime.parsedatetime as parsedatetime
+import parsedatetime.parsedatetime_consts as ptc
from datetime import date
import PyICU
+from i18n import getLocaleSet
logger = logging.getLogger(__name__)
@@ -1775,7 +1777,7 @@
matchKey = cls.textMatches[matchKey]+ " : %s" % dateStr
yield matchKey
else:
- cal = parsedatetime.Calendar()
+ cal =
parsedatetime.Calendar(ptc.Constants(str(getLocaleSet()[0])))
(dateVar, invalidFlag) = cal.parse(target)
if dateVar is not None and invalidFlag is False:
# temporary fix: parsedatetime sometimes returns day == 0
------------------------------------------------------------------------
_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev