[Chandler-dev] Re: [commits] (jeffrey) [11998] - Darshana's fix for bug 7036, improve locale handling when parsing dates, r=pbossut, jeffrey

Darshana Chhajed darshana at osafoundation.org
Thu Oct 12 09:40:52 PDT 2006


It is Bug 6736 and not bug 7036 :(

Bye,
Darshana


commits at osafoundation.org 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
> Commits at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/commits
>   



More information about the chandler-dev mailing list