1 package jodd.datetime; 2 3 /** 4 * Interface for date/time string formatters. Formatter sets and gets date time 5 * values to/from strings. 6 */ 7 public interface JdtFormatter { 8 9 /** 10 * Sets time from string and specified template. It returns a new instance of 11 * <code>DateTimeStamp</code> or <code>null</code> if error occurs. 12 * 13 * @param value string containing date time values 14 * @param template template 15 * 16 * @return DateTimeStamp instance with populated data 17 */ 18 public DateTimeStamp set(String value, String template); 19 20 /** 21 * Gets time from string and specified template. 22 * 23 * @param jdt JDateTime to read from 24 * @param template template 25 * 26 * @return string with date time information 27 */ 28 public String get(JDateTime jdt, String template); 29 30 } 31