Based on the C{style} and C{currentDayStyle} determine what
        day-of-week value is to be returned.

        @type  wd:              integer
        @param wd:              day-of-week value for the current day
        @type  wkdy:            integer
        @param wkdy:            day-of-week value for the parsed day
        @type  offset:          integer
        @param offset:          offset direction for any modifiers (-1, 0, 1)
        @type  style:           integer
        @param style:           normally the value set in C{Constants.DOWParseStyle}
        @type  currentDayStyle: integer
        @param currentDayStyle: normally the value set in C{Constants.CurrentDOWParseStyle}

        @rtype:  integer
        @return: calculated day-of-week

def _CalculateDOWDelta(self, wd, wkdy, offset, style, currentDayStyle):
        """
        Based on the C{style} and C{currentDayStyle} determine what
        day-of-week value is to be returned.

        @type  wd:              integer
        @param wd:              day-of-week value for the current day
        @type  wkdy:            integer
        @param wkdy:            day-of-week value for the parsed day
        @type  offset:          integer
        @param offset:          offset direction for any modifiers (-1, 0, 1)
        @type  style:           integer
        @param style:           normally the value set in C{Constants.DOWParseStyle}
        @type  currentDayStyle: integer
        @param currentDayStyle: normally the value set in C{Constants.CurrentDOWParseStyle}

        @rtype:  integer
        @return: calculated day-of-week
        """
        if offset == 1:
            # modifier is indicating future week eg: "next".
            # DOW is calculated as DOW of next week
            diff = 7 - wd + wkdy

        elif offset == -1:
            # modifier is indicating past week eg: "last","previous"
            # DOW is calculated as DOW of previous week
            diff = wkdy - wd - 7

        elif offset == 0:
            # modifier is indiacting current week eg: "this"
            # DOW is calculated as DOW of this week
            diff = wkdy - wd

        elif offset == 2:
            # no modifier is present.
            # i.e. string to be parsed is just DOW
            if style == 1:
                # next occurance of the DOW is calculated
                if currentDayStyle == True:
                    if wkdy >= wd:
                        diff = wkdy - wd
                    else:
                        diff = 7 - wd + wkdy
                else:
                    if wkdy > wd:
                        diff = wkdy - wd
                    else:
                        diff = 7 - wd + wkdy

            elif style == -1:
                # last occurance of the DOW is calculated
                if currentDayStyle == True:
                    if wkdy <= wd:
                        diff = wkdy - wd
                    else:
                        diff = wkdy - wd - 7
                else:
                    if wkdy < wd:
                        diff = wkdy - wd
                    else:
                        diff = wkdy - wd - 7
            else:
                # occurance of the DOW in the current week is calculated
                diff = wkdy - wd

        if _debug:
            print "wd %s, wkdy %s, offset %d, style %d\n" % (wd, wkdy, offset, style)

        return diff