code: public void applyPattern(String pat)
      {
          this.pattern = pat;
          parsePattern();
  
          setLocale(null, null);
          // reset parsed pattern items
          patternItems = null;
      }
docs: Apply the given unlocalized pattern string to this date format.