code: public static long parsePeriod(String periodStr) {
          PeriodFormatter fmt = PeriodFormat.getDefault();
          Period p = fmt.parsePeriod(periodStr);
          return p.toStandardDuration().getMillis();
      }
docs: Returns the period in msecs