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

Class Constants

source code

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]
 
__init__(self, localeID=None, usePyICU=True, fallbackLocales=['en_US']) source code
 
__getattr__(self, name) 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
 
buildSources(self, sourceTime=None)
Return a dictionary of date/time tuples based on the keys found in self.re_sources.
source code
Method Details [hide private]

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.