code: private Optional<Period> parseDuration(final Symbol periodSym) throws Timex2Exception {
      checkNotNull(periodSym);
  
      final String period = periodSym.toString();
      if (!period.startsWith("P")) {
        return Optional.absent();
      }
  
      for (final Map.Entry<Pattern, Integer> timexExtension : periodPatternsToYearMultipliers
          .entrySet()) {
        final Matcher m = timexExtension.getKey().matcher(period);
        try {
          if (m.lookingAt()) {
            return Optional
                .of(Period.years(timexExtension.getValue() * Integer.parseInt(m.group(1))));
          }
        } catch (final NumberFormatException nfe) {
          log.warn("Failed to parse duration {}, skipping. Due to {}", period, nfe);
          return Optional.absent();
        }
      }
  
      try {
        return Optional.of(ISO8601_PERIOD_PARSER.parsePeriod(period));
      } catch (final IllegalArgumentException iae) {
        return Optional.absent();
      }
    }
docs: This method makes a "best effort" to make a {@link Period} out of a TIMEX2 period string.<br>
  TIMEX2 periods are superset of ISO 8601 periods. For example, TIMEX2 periods can have strings
  like SU (for summer), FY (for fiscal year) or X for unspecified numbers (like PXM for
  unspecified no. of months). This method will return Optional.absent() for any such non-ISO8601
  Period values.<br>
  The only special consideration is with decade,century or millenium markers (E,C,L in Timex2001;
  CE,DE,ML in Timex2005). These will be multiplied by appropriate multipliers to get the right
  period. For details refer to sections 4.2 and 4.3 of Timex2005 specification.
  
  @param periodSym period-value as Symbol
  @return Optional {@link Period} object (see the description for when Optional.absent will be
  returned).
  @throws Timex2Exception if periodSym is not a valid period string (e.g. it doesn't start with
  P)
  @author rgabbard