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

type 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']) 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
 
getSource(self, sourceKey, sourceTime=None)
GetReturn a date/time tuple based on the giving source key and the corresponding key found in self.re_sources.
source code
Method Details [hide private]

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

source code 
Overrides: object.__init__
(inherited documentation)

getSource(self, sourceKey, sourceTime=None)

source code 

GetReturn a date/time tuple based on the giving source key and the corresponding key 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.