Home | Trees | Indices | Help |
|
---|
|
|
|||
object
|
__init__(self,
constants=None) Default constructor for the Calendar class. |
||
integer
|
_convertUnitAsWords(self,
unitText) Converts text units into their number value |
||
struct_time
|
_buildTime(self,
source,
quantity,
modifier,
units) Take quantity , modifier and
unit strings and convert them into values.
|
||
struct_time
|
parseDate(self,
dateString) Parse short-form date strings: |
||
struct_time
|
parseDateText(self,
dateString) Parse long-form date strings: |
||
tuple
|
evalRanges(self,
datetimeString,
sourceTime=None) Evaluate the datetimeString text and determine if it
represents a date or time range.
|
||
integer
|
_CalculateDOWDelta(self,
wd,
wkdy,
offset,
style,
currentDayStyle) Based on the style and currentDayStyle
determine what day-of-week value is to be returned.
|
||
tuple
|
_evalModifier(self,
modifier,
chunk1,
chunk2,
sourceTime) Evaluate the modifier string and following text
(passed in as chunk1 and chunk2 ) and if
they match any known modifiers calculate the delta and apply it to
sourceTime .
|
||
tuple
|
_evalModifier2(self,
modifier,
chunk1,
chunk2,
sourceTime) Evaluate the modifier string and following text
(passed in as chunk1 and chunk2 ) and if
they match any known modifiers calculate the delta and apply it to
sourceTime .
|
||
datetime
|
_evalString(self,
datetimeString,
sourceTime=None) Calculate the datetime based on flags set by the parse() routine |
||
tuple
|
parse(self,
datetimeString,
sourceTime=None) Splits the given datetimeString into tokens, finds
the regex patterns that match and then calculates a
struct_time value from the chunks.
|
||
datetime
|
inc(self,
source,
month=None,
year=None) Takes the given source date, or current date if none
is passed, and increments it according to the values passed in by
month and/or year.
|
|
|
Converts text units into their number value Five = 5 Twenty Five = 25 Two hundred twenty five = 225 Two thousand and twenty five = 2025 Two thousand twenty five = 2025
|
quantity , modifier and
unit strings and convert them into values. After converting,
calcuate the time and return the adjusted sourceTime.
|
'05/28/2006' or '04.21'
|
'May 31st, 2006' 'Jan 1st' 'July 2006'
|
datetimeString text and determine if it
represents a date or time range.
|
style and currentDayStyle
determine what day-of-week value is to be returned.
|
modifier string and following text (passed
in as chunk1 and chunk2 ) and if they match any
known modifiers calculate the delta and apply it to
sourceTime .
|
modifier string and following text (passed
in as chunk1 and chunk2 ) and if they match any
known modifiers calculate the delta and apply it to
sourceTime .
|
Calculate the datetime based on flags set by the parse() routine Examples handled:RFC822, W3CDTF formatted dates HH:MM[:SS][ am/pm] MM/DD/YYYY DD MMMM YYYY
|
Splits the given If datetimeString is parsed and date/time value found
then the second item of the returned tuple will be a flag to let you know
what kind of struct_time value is being returned:
0 = not parsed at all 1 = parsed as a C{date} 2 = parsed as a C{time} 3 = parsed as a C{datetime}
|
Takes the given timedelta()
function does not allow for month or year increments.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Wed Feb 14 03:25:05 2007 | http://epydoc.sourceforge.net |