code: def _evalMeridian(self, datetimeString, sourceTime):
          
          s = datetimeString.strip()
          sourceTime = self._evalDT(datetimeString, sourceTime)
  
          # Given string is in the format HH:MM(:SS)(am/pm)
          yr, mth, dy, hr, mn, sec, wd, yd, isdst = sourceTime
  
          m = self.ptc.CRE_TIMEHMS2.search(s)
          if m is not None:
              dt = s[:m.start('meridian')].strip()
              if len(dt) <= 2:
                  hr = int(dt)
                  mn = 0
                  sec = 0
              else:
                  hr, mn, sec = _extract_time(m)
  
              if hr == 24:
                  hr = 0
  
              meridian = m.group('meridian').lower()
  
              # if 'am' found and hour is 12 - force hour to 0 (midnight)
              if (meridian in self.ptc.am) and hr == 12:
                  hr = 0
  
              # if 'pm' found and hour < 12, add 12 to shift to evening
              if (meridian in self.ptc.pm) and hr < 12:
                  hr += 12
  
          # time validation
          if hr < 24 and mn < 60 and sec < 60:
              sourceTime = (yr, mth, dy, hr, mn, sec, wd, yd, isdst)
              _pop_time_accuracy(m, self.currentContext)
  
          return sourceTime
docs: Evaluate text passed by L{_partialParseMeridian()}