类的使用
org.apache.velocity.tools.generic.ComparisonDateTool.Comparison
程序包
说明
Contains a collection of reusable, general-purpose "tools" for Velocity.
-
org.apache.velocity.tools.generic中ComparisonDateTool.Comparison的使用
修饰符和类型方法说明ComparisonDateTool.Comparison.abbr(boolean abbr) Sets whether or not this comparison is to be rendered in abbreviated form or not.protected ComparisonDateTool.ComparisonInternal comparison method.ComparisonDateTool.Comparison.depth(int depth) Set the maximum number of units to render for this comparison.ComparisonDateTool.difference(Object now, Object then) Returns aComparisonDateTool.Comparisonbetween the result of the second specified date and the first specified date.ComparisonDateTool.Comparison.getAbbr()This is equivalent to callingabbr(boolean abbr)withtrueas the argument, thus setting this comparison to be rendered in abbreviated form.ComparisonDateTool.Comparison.getDifference()Sets this comparison to be rendered as aComparisonDateTool.difference(java.lang.Object, java.lang.Object).ComparisonDateTool.Comparison.getExact()Sets this comparison to be rendered as if it where generated using theComparisonDateTool.timespan(Object now, Object then)method.ComparisonDateTool.Comparison.getFull()Sets thedepth(int depth)to which this comparison is rendered to the maximum number of time units available to the tool.ComparisonDateTool.Comparison.getRelative()Sets this comparison to be rendered as if it where generated using theComparisonDateTool.whenIs(Object now, Object then)method.Sets the locale used to look up the textual portions of the rendering.Returns aComparisonDateTool.Comparisonbetween the result of the second specified date and the first specified date.Returns aComparisonDateTool.Comparisonbetween the result ofDateTool.getCalendar()and the specified date.Returns aComparisonDateTool.Comparisonbetween the second specified date and the first specified date.