Package parsedatetime :: Module parsedatetime_consts
[hide private]
[frames] | no frames]

Module parsedatetime_consts

source code

parsedatetime constants and helper functions to determine regex values from Locale information if present.

Also contains the internal Locale classes to give some sane defaults if PyICU is not found.


License: Copyright (c) 2004-2008 Mike Taylor Copyright (c) 2006-2008 Darshana Chhajed Copyright (c) 2007 Bernd Zeimetz <bzed@debian.org> All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Classes [hide private]
  pdtLocale_en
en_US Locale constants
  pdtLocale_au
en_AU Locale constants
  pdtLocale_es
es Locale constants
  pdtLocale_de
de_DE Locale constants
  Constants
Default set of constants for parsedatetime.
Functions [hide private]
 
_initLocale(ptc)
Helper function to initialize the different lists and strings from either PyICU or one of the internal pdt Locales and store them into ptc.
source code
 
_initSymbols(ptc)
Helper function to initialize the single character constants and other symbols needed.
source code
 
_initPatterns(ptc)
Helper function to take the different localized bits from ptc and create the regex strings.
source code
 
_initConstants(ptc)
Create localized versions of the units, week and month names
source code
Variables [hide private]
  pyicu = None
  pdtLocales = {'de_DE': <class parsedatetime.parsedatetime_cons...
Variables Details [hide private]

pdtLocales

Value:
{'en_US': pdtLocale_en, 'en_AU': pdtLocale_au, 'es_ES': pdtLocale_es, \
'de_DE': pdtLocale_de,}