1 16 17 package org.apache.taglibs.i18n; 18 19 import java.text.DateFormat ; 20 import java.text.Format ; 21 22 28 public class FormatDateTimeTag extends FormatDateTagSupport { 29 30 protected static final String _tagname = "i18n:formatDateTime"; 31 32 private int dateStyle = DateFormat.SHORT; 33 private int timeStyle = DateFormat.SHORT; 34 35 36 public void setDateStyle( String style ) { 39 this.dateStyle = getStyleCode( style ); 40 } 41 42 public void setTimeStyle( String style ) { 43 this.timeStyle = getStyleCode( style ); 44 } 45 46 protected Format getFormat() { 49 return DateFormat.getDateTimeInstance( dateStyle, timeStyle, getLocale() ); 50 } 51 } 52 53 | Popular Tags |