public static String format ( ITemplate template , Date date , String pattern , Locale locale , String timezone ) { if ( null == date ) throw new NullPointerException ( ) ; RythmEngine engine = null == template ? RythmEngine . get ( ) : template . __engine ( ) ; DateFormat df = ( null == engine ? IDateFormatFactory . DefaultDateFormatFactory . INSTANCE : engine . dateFormatFactory ( ) ) . createDateFormat ( template , pattern , locale , timezone ) ; return df . format ( date ) ; }
Format a date with specified pattern lang locale and timezone . The locale comes from the engine instance specified