def parseDateText(self, dateString, sourceTime=None):
if sourceTime is None:<EOL><INDENT>yr, mth, dy, hr, mn, sec, wd, yd, isdst = time.localtime()<EOL><DEDENT>else:<EOL><INDENT>yr, mth, dy, hr, mn, sec, wd, yd, isdst = sourceTime<EOL><DEDENT>currentMth = mth<EOL>currentDy = dy<EOL>accuracy = []<EOL>debug and log.debug('<STR_LIT>',<EOL>mth, dy)<EOL>s = dateString.lower()<EOL>m = self.ptc.CRE_DATE3.search(s)<EOL>mth = m.group('<STR_LIT>')<EOL>mth = self.ptc.MonthOffsets[mth]<EOL>accuracy.append('<STR_LIT>')<EOL>if m.group('<STR_LIT>') is not None:<EOL><INDENT>dy = int(m.group('<STR_LIT>'))<EOL>accuracy.append('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>dy = <NUM_LIT:1><EOL><DEDENT>if m.group('<STR_LIT>') is not None:<EOL><INDENT>yr = int(m.group('<STR_LIT>'))<EOL>accuracy.append('<STR_LIT>')<EOL>if yr < self.ptc.BirthdayEpoch:<EOL><INDENT>yr += <NUM_LIT><EOL><DEDENT>elif yr < <NUM_LIT:100>:<EOL><INDENT>yr += <NUM_LIT><EOL><DEDENT><DEDENT>elif (mth < currentMth) or (mth == currentMth and dy < currentDy):<EOL><INDENT>yr += self.ptc.YearParseStyle<EOL><DEDENT>with self.context() as ctx:<EOL><INDENT>if dy > <NUM_LIT:0> and dy <= self.ptc.daysInMonth(mth, yr):<EOL><INDENT>sourceTime = (yr, mth, dy, hr, mn, sec, wd, yd, isdst)<EOL>ctx.updateAccuracy(*accuracy)<EOL><DEDENT>else:<EOL><INDENT>sourceTime = time.localtime()<EOL><DEDENT><DEDENT>debug and log.debug('<STR_LIT>'<EOL>'<STR_LIT>',<EOL>mth, dy, yr, sourceTime)<EOL>return sourceTime<EOL>
Parse long-form date strings::

    'May 31st, 2006'
    'Jan 1st'
    'July 2006'

@type  dateString: string
@param dateString: text to convert to a datetime
@type  sourceTime:     struct_time
@param sourceTime:     C{struct_time} value to use as the base

@rtype:  struct_time
@return: calculated C{struct_time} value of dateString