Example #1
0
def _parseEventInfoForLocale(mailStamp, locale=None):
    try:
        view = mailStamp.itsItem.itsView
        startTime, endTime, countFlag, typeFlag = \
                           parseText(view, mailStamp.subject, locale)

        if countFlag == 0:
            # No datetime info found im mail message subject
            # so lets try the body
            startTime, endTime, countFlag, typeFlag = \
                              parseText(view, mailStamp.itsItem.body, locale)
    except Exception, e:
        # The parsedatetime API has some localization bugs that
        # need to be fixed. Capturing Exceptions ensures that
        # the issue does not bubble up to the user as an
        # error message.
        startTime = endTime = countFlag = typeFlag = 0
Example #2
0
def _parseEventInfoForLocale(mailStamp, locale=None):
    try:
        view = mailStamp.itsItem.itsView
        startTime, endTime, countFlag, typeFlag = \
                           parseText(view, mailStamp.subject, locale)

        if countFlag == 0:
            # No datetime info found im mail message subject
            # so lets try the body
            startTime, endTime, countFlag, typeFlag = \
                              parseText(view, mailStamp.itsItem.body, locale)
    except Exception, e:
        # The parsedatetime API has some localization bugs that
        # need to be fixed. Capturing Exceptions ensures that
        # the issue does not bubble up to the user as an
        # error message.
        startTime = endTime = countFlag = typeFlag = 0
Example #3
0
    def __init__(self, view, text):
        self.view = view
        self.text = text
        self.item = Note(itsView = view)
        self.item.InitOutgoingAttributes()

        self.parse_tuple = parseText(view, text)
        self.handled_event = False
        self.handled_reminder = False