A collection of routines to input, parse and manipulate date and
times. The text can either be 'normal' date values or it can be human
readable.
integer
|
_CalculateDOWDelta(self,
wd,
wkdy,
offset,
style,
currentDayStyle)
Based on the style and currentDayStyle
determine what day-of-week value is to be returned. |
source code
|
|
|
|
object
|
|
struct_time
|
_buildTime(self,
source,
quantity,
modifier,
units)
Take quantity , modifier and
unit strings and convert them into values. |
source code
|
|
integer
|
|
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 . |
source code
|
|
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 . |
source code
|
|
datetime
|
|
int
|
|
tuple
|
evalRanges(self,
datetimeString,
sourceTime=None)
Evaluate the datetimeString text and determine if it
represents a date or time range. |
source code
|
|
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. |
source code
|
|
tuple or None
|
nlp(self,
inputString,
sourceTime=None)
Utilizes parse() after making judgements about what datetime
information belongs together. |
source code
|
|
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. |
source code
|
|
tuple
|
parseDT(self,
datetimeString,
sourceTime=None,
tzinfo=None)
datetimeString is as .parse ,
sourceTime has the same semantic meaning as
.parse , but now also accepts datetime objects. |
source code
|
|
struct_time
|
|
struct_time
|
|