time.java
来自「LazyJ是一个快速Web应用程序开发框架。它包括: *.一个非常快的模板引擎」· Java 代码 · 共 47 行
JAVA
47 行
/** * */package lazyj.page.tags;import lazyj.Format;import lazyj.page.StringFormat;/** * <i>time</i> decodes the value into a Date object then displays only the time part of it. * * @author costing * @since 2006-10-14 * @see Date * @see NiceDate */public final class Time implements StringFormat { /** * Simple tag to nicely show the time part of a date. The original string is first parsed into a Date object * then formatted to show only the time from it. * * @param sTag tag name, ignored * @param sOption always "time" * @param s original date / time to display * @return time representation * @see Format#parseDate(String) * @see Format#showTime(java.util.Date) */ public String format(final String sTag, final String sOption, final String s) { if (s==null || s.length()==0){ // empty string return s; } final java.util.Date d = Format.parseDate(s); if (d==null){ // unrecognized date format return null; } return Format.showTime(d); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?