code: public static String generateDomainDate(final Date domainDate) {
          if (domainDate == null) {
              throw new SwidException("domainDate isn't defined");
          }
  
          SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM");
          return dateFormat.format(domainDate);
      }
docs: Generate domain date in format <code>'yyyy-MM'</code>.
  
  @param domainDate
  the domain date
  @return generated domain date in format <code>'yyyy-MM'</code>; e.g. <code>'2010-04'</code>