Package parsedatetime :: Class Constants
[hide private]
[frames] | no frames]

Class Constants

source code

object --+
         |
        Constants

Default set of constants for parsedatetime.

If PyICU is present, then the class will first try to get PyICU to return a locale specified by localeID. If either localeID is None or if the locale does not exist within PyICU, then each of the locales defined in fallbackLocales is tried in order.

If PyICU is not present or none of the specified locales can be used, then the class will initialize itself to the en_US locale.

if PyICU is not present or not requested, only the locales defined by pdtLocales will be searched.

Instance Methods [hide private]
 
__getattr__(self, name) source code
 
__init__(self, localeID=None, usePyICU=True, fallbackLocales=['en_US'])
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
buildSources(self, sourceTime=None)
Return a dictionary of date/time tuples based on the keys found in self.re_sources.
source code
 
daysInMonth(self, month, year)
Take the given month (1-12) and a given year (4 digit) return the number of days in the month adjusting for leap year as needed
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, localeID=None, usePyICU=True, fallbackLocales=['en_US'])
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

buildSources(self, sourceTime=None)

source code 

Return a dictionary of date/time tuples based on the keys found in self.re_sources.

The current time is used as the default and any specified item found in self.re_sources is inserted into the value and the generated dictionary is returned.