code: public static void annotateDateWithPattern(JAnnotationUse jAnnotationUse, String type, String format) {
  
  		String param = type.toUpperCase();
  		switch (param) {
  			case "DATE-ONLY":
  				// example: 2013-09-29
  				jAnnotationUse.param("pattern", "yyyy-MM-dd");
  				break;
  			case "TIME-ONLY":
  				// example: 19:46:19
  				jAnnotationUse.param("pattern", "HH:mm:ss");
  				break;
  			case "DATETIME-ONLY":
  				// example: 2013-09-29T19:46:19
  				jAnnotationUse.param("pattern", "yyyy-MM-dd'T'HH:mm:ss");
  				break;
  			case "DATETIME":
  				if ("rfc2616".equalsIgnoreCase(format)) {
  					// example: Tue, 15 Nov 1994 12:45:26 GMT
  					jAnnotationUse.param("pattern", "EEE, dd MMM yyyy HH:mm:ss z");
  				} else {
  					jAnnotationUse.param("pattern", "yyyy-MM-dd'T'HH:mm:ssXXX");
  				}
  				break;
  			default:
  				jAnnotationUse.param("pattern", "yyyy-MM-dd'T'HH:mm:ss");
  		}
  	}
docs: Adds appropriate <code>pattern</code> attribute to provided annotation on
  {@link Date} property.
  
  @param jAnnotationUse
  annotation to add pattern. Can be for: {@link JsonFormat} or
  {@link DateTimeFormat}
  @param type
  RAML type of the property
  @param format
  of date if specified