Code example for SimpleDateFormat

Methods: clone

0
     * Use this accessor to access the <tt>DEFAULT_DATE_FORMAT</tt>. 
     *  
     * @return A clone of DEFAULT_DATE_FORMAT. 
     */ 
    protected static final SimpleDateFormat getDefaultDateFormat() { 
        return (SimpleDateFormat) DEFAULT_DATE_FORMAT.clone(); 
    } 
 
    /** 
     * Transforms short date format pattern into full format pattern for SimpleDateFormat 
     * (e.g., "YMD" to "yyyyMMdd"). 
     * 
     * @param pattern The short pattern. 
     * @return The full pattern. 
     */ 
    protected static String getFullDatePattern(final String pattern) { 
        if (pattern == null) { return "yyyyMMdd"; } 
        int len = pattern.length(); 
        if (len == 0) { return "yyyyMMdd"; }