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.

Classes [hide private]
  pdtLocale_en
en_US Locale constants
  pdtLocale_au
en_AU Locale constants
  pdtLocale_es
es 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.
  _initSymbols(ptc)
Helper function to initialize the single character constants and other symbols needed.
  _initPatterns(ptc)
Helper function to take the different localized bits from ptc and create the regex strings.
  _initConstants(ptc)
Create localized versions of the units, week and month names

Variables [hide private]
  __license__ = '\nCopyright (c) 2004-2007 Mike Taylor\nCopyright (c...
  pdtLocales = {'en_US': <class parsedatetime.parsedatetime_consts....

Function Details [hide private]

_initLocale(ptc)

source code 
Helper function to initialize the different lists and strings from either PyICU or one of the internal pdt Locales and store them into ptc.

_initSymbols(ptc)

source code 
Helper function to initialize the single character constants and other symbols needed.

_initPatterns(ptc)

source code 
Helper function to take the different localized bits from ptc and create the regex strings.

_initConstants(ptc)

source code 
Create localized versions of the units, week and month names

Variables Details [hide private]

__license__

None
Value:
'''
Copyright (c) 2004-2007 Mike Taylor
Copyright (c) 2006-2007 Darshana Chhajed
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
...                                                                    
      

pdtLocales

None
Value:
{'en_AU': <class parsedatetime.parsedatetime_consts.pdtLocale_au at 0x
143de10>,
 'en_US': <class parsedatetime.parsedatetime_consts.pdtLocale_en at 0x
143dde0>,
 'es': <class parsedatetime.parsedatetime_consts.pdtLocale_es at 0x143
de40>}