public class RelativeDateFormatDirective extends AbstractDirective
velocity 相对日期格式标签
例如: #relativeDateFormat($!{testDate}) 【 输出:1小时前 】
| 构造器和说明 |
|---|
RelativeDateFormatDirective() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
doRender(org.apache.velocity.context.InternalContextAdapter internalContext,
org.apache.velocity.tools.view.ViewToolContext context,
Writer writer,
org.apache.velocity.runtime.parser.node.Node node) |
String |
getName() |
int |
getType() |
renderpublic String getName()
getName 在类中 org.apache.velocity.runtime.directive.Directivepublic int getType()
getType 在类中 org.apache.velocity.runtime.directive.Directiveprotected boolean doRender(org.apache.velocity.context.InternalContextAdapter internalContext,
org.apache.velocity.tools.view.ViewToolContext context,
Writer writer,
org.apache.velocity.runtime.parser.node.Node node)
throws IOException,
org.apache.velocity.exception.ResourceNotFoundException,
org.apache.velocity.exception.ParseErrorException,
org.apache.velocity.exception.MethodInvocationException
doRender 在类中 AbstractDirectiveIOExceptionorg.apache.velocity.exception.ResourceNotFoundExceptionorg.apache.velocity.exception.ParseErrorExceptionorg.apache.velocity.exception.MethodInvocationExceptionCopyright © 2016. All rights reserved.