code: protected int getDateValueOffset(String offsetString, char c) {
          ArrayList<Character> charList = new ArrayList<Character>();
  
          int index = offsetString.indexOf(c);
          if (index != -1) {
              for (int i = index-1; i >= 0; i--) {
                  if (Character.isDigit(offsetString.charAt(i))) {
                      charList.add(0, offsetString.charAt(i));
                  } else {
  
                      StringBuffer offsetValue = new StringBuffer();
                      offsetValue.append("0");
                      for (int j = 0; j < charList.size(); j++) {
                          offsetValue.append(charList.get(j));
                      }
  
                      if (offsetString.charAt(i) == '-') {
                          return Integer.valueOf("-" + offsetValue.toString());
                      } else {
                          return Integer.valueOf(offsetValue.toString());
                      }
                  }
              }
          }
  
          return 0;
      }
docs: Parse offset string and add or subtract date offset value.
  
  @param offsetString
  @param c
  @return