def _CalculateDOWDelta(self, wd, wkdy, offset, style, currentDayStyle):
diffBase = wkdy - wd<EOL>origOffset = offset<EOL>if offset == <NUM_LIT:2>:<EOL><INDENT>if wkdy * style > wd * style orcurrentDayStyle and wkdy == wd:<EOL><INDENT>offset = <NUM_LIT:0><EOL><DEDENT>elif style in (-<NUM_LIT:1>, <NUM_LIT:1>):<EOL><INDENT>offset = style<EOL><DEDENT>else:<EOL><INDENT>offset = <NUM_LIT:0><EOL><DEDENT><DEDENT>diff = diffBase + <NUM_LIT:7> * offset<EOL>if style == <NUM_LIT:1> and diff < -<NUM_LIT:7>:<EOL><INDENT>diff += <NUM_LIT:7><EOL><DEDENT>elif style == -<NUM_LIT:1> and diff > <NUM_LIT:7>:<EOL><INDENT>diff -= <NUM_LIT:7><EOL><DEDENT>debug and log.debug("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>wd, wkdy, origOffset, style, currentDayStyle)<EOL>return diff<EOL>
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