blob: 4ff6354be667fb2e98e39765bd5aef0601cb11e1 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_171) on Wed Jun 20 14:25:31 CEST 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ComparisonDateTool (VelocityTools 3.0-SNAPSHOT API)</title>
<meta name="date" content="2018-06-20">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ComparisonDateTool (VelocityTools 3.0-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":10,"i10":10,"i11":9,"i12":9,"i13":10,"i14":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ComparisonDateTool.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/velocity/tools/generic/CollectionTool.PropertiesComparator.html" title="class in org.apache.velocity.tools.generic"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/velocity/tools/generic/ComparisonDateTool.html" target="_top">Frames</a></li>
<li><a href="ComparisonDateTool.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.velocity.tools.generic</div>
<h2 title="Class ComparisonDateTool" class="title">Class ComparisonDateTool</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html" title="class in org.apache.velocity.tools.generic">org.apache.velocity.tools.generic.SafeConfig</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/velocity/tools/generic/LocaleConfig.html" title="class in org.apache.velocity.tools.generic">org.apache.velocity.tools.generic.LocaleConfig</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/velocity/tools/generic/FormatConfig.html" title="class in org.apache.velocity.tools.generic">org.apache.velocity.tools.generic.FormatConfig</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/velocity/tools/generic/DateTool.html" title="class in org.apache.velocity.tools.generic">org.apache.velocity.tools.generic.DateTool</a></li>
<li>
<ul class="inheritance">
<li>org.apache.velocity.tools.generic.ComparisonDateTool</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
</dl>
<hr>
<br>
<pre><a href="../../../../../org/apache/velocity/tools/config/ValidScope.html" title="annotation in org.apache.velocity.tools.config">@ValidScope</a>(<a href="../../../../../org/apache/velocity/tools/config/ValidScope.html#value--">value</a>="application")
public class <span class="typeNameLabel">ComparisonDateTool</span>
extends <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html" title="class in org.apache.velocity.tools.generic">DateTool</a></pre>
<div class="block"><p>Tool for comparing <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a> and <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util"><code>Calendar</code></a> values
in Velocity templates. This is a subclass of <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html" title="class in org.apache.velocity.tools.generic"><code>DateTool</code></a>
and thus provides all the functionality of that tool and
augments it with the ability to find the relationship between
any date and the current date, or between any two dates.
This comparison can result in either a textual representation
of the relationship (e.g. "3 weeks, 2 days ago", "tomorrow", or
"3 hrs away") or the value of a specific time unit may be requested.
When using the textual representations, you can configure the
tool to use alternate resource bundles and to skip over units
you do not want to be included.</p>
<pre>
Example of formatting the "current" date:
$date.whenIs('2005-07-04') -&gt; 1 year ago
$date.whenIs('2007-02-15').full -&gt; 1 year 32 weeks 2 days 17 hours 38 minutes 44 seconds 178 milliseconds ago
$date.whenIs('2007-02-15').days -&gt; -730
$date.whenIs($date.calendar) -&gt; now
$date.whenIs('2005-07-04', '2005-07-04') -&gt; same time
$date.difference('2005-07-04','2005-07-04') -&gt; 0 milliseconds
$date.difference('2005-07-04','2007-02-15').abbr -&gt; 1 yr
Example tools.xml config (if you want to use this with VelocityView):
&lt;tools&gt;
&lt;toolbox scope="application"&gt;
&lt;tool class="org.apache.velocity.tools.generic.ComparisonDateTool"
format="yyyy-MM-dd" depth="1" skip="month,week,millisecond"
bundle="org.apache.velocity.tools.generic.times"/&gt;
&lt;/toolbox&gt;
&lt;/tools&gt;
</pre></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>VelocityTools 1.4</dd>
<dt><span class="simpleTagLabel">Version:</span></dt>
<dd>$Revision: 1769055 $ $Date: 2006-04-04 12:35:17 -0700 (Tue, 04 Apr 2006) $</dd>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Nathan Bubna, Chris Townsen</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.velocity.tools.generic.ComparisonDateTool">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic">ComparisonDateTool.Comparison</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#ABBR_SUFFIX">ABBR_SUFFIX</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#AFTER_KEY">AFTER_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#BEFORE_KEY">BEFORE_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#BUNDLE_NAME_KEY">BUNDLE_NAME_KEY</a></span></code>
<div class="block">The key used for specifying a default locale via toolbox params.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#CURRENT_PREFIX">CURRENT_PREFIX</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#CURRENT_TYPE">CURRENT_TYPE</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#DAY_KEY">DAY_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#DEFAULT_BUNDLE_NAME">DEFAULT_BUNDLE_NAME</a></span></code>
<div class="block">The default path of the relative format resource bundles.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#DEPTH_KEY">DEPTH_KEY</a></span></code>
<div class="block">The key used for specifying a different default depth via toolbox params.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#DIFF_TYPE">DIFF_TYPE</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#EQUAL_KEY">EQUAL_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#HOUR_KEY">HOUR_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MILLIS_PER_DAY">MILLIS_PER_DAY</a></span></code>
<div class="block">The number of milliseconds in a day.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MILLIS_PER_HOUR">MILLIS_PER_HOUR</a></span></code>
<div class="block">The number of milliseconds in an hour.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MILLIS_PER_MINUTE">MILLIS_PER_MINUTE</a></span></code>
<div class="block">The number of millseconds in a minute.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MILLIS_PER_MONTH">MILLIS_PER_MONTH</a></span></code>
<div class="block">An approximation of the number of milliseconds in a month.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MILLIS_PER_SECOND">MILLIS_PER_SECOND</a></span></code>
<div class="block">The number of milliseconds in a second.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MILLIS_PER_WEEK">MILLIS_PER_WEEK</a></span></code>
<div class="block">The number of milliseconds in a week.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MILLIS_PER_YEAR">MILLIS_PER_YEAR</a></span></code>
<div class="block">An approximation of the number of milliseconds in a year.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MILLISECOND_KEY">MILLISECOND_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MINUTE_KEY">MINUTE_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#MONTH_KEY">MONTH_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#ONE_DAY_SUFFIX">ONE_DAY_SUFFIX</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#PLURAL_SUFFIX">PLURAL_SUFFIX</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#RELATIVE_TYPE">RELATIVE_TYPE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#SECOND_KEY">SECOND_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#SKIPPED_UNITS_KEY">SKIPPED_UNITS_KEY</a></span></code>
<div class="block">The key used for specifying time units to be skipped over.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#TIME_UNITS">TIME_UNITS</a></span></code>
<div class="block">Array of all time unit message keys to their millisecond conversion factor.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#WEEK_KEY">WEEK_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#YEAR_KEY">YEAR_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#ZERO_KEY">ZERO_KEY</a></span></code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.velocity.tools.generic.DateTool">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/DateTool.html" title="class in org.apache.velocity.tools.generic">DateTool</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#TIMEZONE_KEY">TIMEZONE_KEY</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.velocity.tools.generic.FormatConfig">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/FormatConfig.html" title="class in org.apache.velocity.tools.generic">FormatConfig</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/FormatConfig.html#DEFAULT_FORMAT">DEFAULT_FORMAT</a>, <a href="../../../../../org/apache/velocity/tools/generic/FormatConfig.html#FORMAT_KEY">FORMAT_KEY</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.velocity.tools.generic.LocaleConfig">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/LocaleConfig.html" title="class in org.apache.velocity.tools.generic">LocaleConfig</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/LocaleConfig.html#DEFAULT_LOCALE">DEFAULT_LOCALE</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.velocity.tools.generic.SafeConfig">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html" title="class in org.apache.velocity.tools.generic">SafeConfig</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#LOCK_CONFIG_KEY">LOCK_CONFIG_KEY</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#log">log</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#LOGGER_NAME_KEY">LOGGER_NAME_KEY</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#SAFE_MODE_KEY">SAFE_MODE_KEY</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#USE_CLASS_LOGGER_KEY">USE_CLASS_LOGGER_KEY</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#ComparisonDateTool--">ComparisonDateTool</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic">ComparisonDateTool.Comparison</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#compare-java.lang.Object-java.lang.Object-int-">compare</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;now,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;then,
int&nbsp;type)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#configure-org.apache.velocity.tools.generic.ValueParser-">configure</a></span>(<a href="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic">ValueParser</a>&nbsp;values)</code>
<div class="block">Calls the superclass implementation, then looks for a bundle name
and any time units to be skipped.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic">ComparisonDateTool.Comparison</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#difference-java.lang.Object-java.lang.Object-">difference</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;now,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;then)</code>
<div class="block">Returns a <a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic"><code>ComparisonDateTool.Comparison</code></a> between the result of
the second specified date and the first specified date.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#getText-java.lang.String-java.util.Locale-">getText</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;locale)</code>
<div class="block">Retrieves the specified text resource.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#toDays-long-">toDays</a></span>(long&nbsp;ms)</code>
<div class="block">Returns the number of whole Days in the specified number of milliseconds.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#toHours-long-">toHours</a></span>(long&nbsp;ms)</code>
<div class="block">Returns the number of whole Hours in the specified number of milliseconds.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#toMinutes-long-">toMinutes</a></span>(long&nbsp;ms)</code>
<div class="block">Returns the number of whole Minutes in the specified number of milliseconds.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#toMonths-long-">toMonths</a></span>(long&nbsp;ms)</code>
<div class="block">Returns the number of whole Months in the specified number of milliseconds.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#toSeconds-long-">toSeconds</a></span>(long&nbsp;ms)</code>
<div class="block">Returns the number of whole Seconds in the specified number of milliseconds.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#toString-long-int-boolean-java.util.Locale-">toString</a></span>(long&nbsp;diff,
int&nbsp;maxUnitDepth,
boolean&nbsp;abbreviate,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;locale)</code>
<div class="block">Converts the specified positive duration of milliseconds into larger
units up to the specified number of positive units, beginning with the
largest positive unit.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#toString-long-int-int-boolean-java.util.Locale-">toString</a></span>(long&nbsp;ms,
int&nbsp;type,
int&nbsp;depth,
boolean&nbsp;abbr,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;loc)</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#toWeeks-long-">toWeeks</a></span>(long&nbsp;ms)</code>
<div class="block">Returns the number of whole Weeks in the specified number of milliseconds.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#toYears-long-">toYears</a></span>(long&nbsp;ms)</code>
<div class="block">Returns the number of whole Years in the specified number of milliseconds.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic">ComparisonDateTool.Comparison</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#whenIs-java.lang.Object-">whenIs</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;then)</code>
<div class="block">Returns a <a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic"><code>ComparisonDateTool.Comparison</code></a> between the result of
<a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getCalendar--"><code>DateTool.getCalendar()</code></a> and the specified date.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic">ComparisonDateTool.Comparison</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.html#whenIs-java.lang.Object-java.lang.Object-">whenIs</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;now,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;then)</code>
<div class="block">Returns a <a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic"><code>ComparisonDateTool.Comparison</code></a> between the second specified date
and the first specified date.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.velocity.tools.generic.DateTool">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/DateTool.html" title="class in org.apache.velocity.tools.generic">DateTool</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#format-java.lang.Object-">format</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#format-java.lang.String-java.lang.Object-">format</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#format-java.lang.String-java.lang.Object-java.util.Locale-">format</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#format-java.lang.String-java.lang.Object-java.util.Locale-java.util.TimeZone-">format</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#format-java.lang.String-java.lang.String-java.lang.Object-">format</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#format-java.lang.String-java.lang.String-java.lang.Object-java.util.Locale-">format</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#format-java.lang.String-java.lang.String-java.lang.Object-java.util.Locale-java.util.TimeZone-">format</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#get-java.lang.String-">get</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#get-java.lang.String-java.lang.String-">get</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getCalendar--">getCalendar</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getDate--">getDate</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getDateFormat-java.lang.String-java.util.Locale-java.util.TimeZone-">getDateFormat</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getDateFormat-java.lang.String-java.lang.String-java.util.Locale-java.util.TimeZone-">getDateFormat</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getDay--">getDay</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getDay-java.lang.Object-">getDay</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getMonth--">getMonth</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getMonth-java.lang.Object-">getMonth</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getSystemCalendar--">getSystemCalendar</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getSystemDate--">getSystemDate</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getSystemTime--">getSystemTime</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getTimeZone--">getTimeZone</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getValue-int-java.lang.Object-">getValue</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getValue-java.lang.Object-">getValue</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getValue-java.lang.Object-java.lang.Object-">getValue</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getYear--">getYear</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getYear-java.lang.Object-">getYear</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#setTimeZone-java.util.TimeZone-">setTimeZone</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#toCalendar-java.lang.Object-">toCalendar</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#toCalendar-java.lang.Object-java.util.Locale-">toCalendar</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#toDate-java.lang.Object-">toDate</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#toDate-java.lang.String-java.lang.Object-">toDate</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#toDate-java.lang.String-java.lang.Object-java.util.Locale-">toDate</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#toDate-java.lang.String-java.lang.Object-java.util.Locale-java.util.TimeZone-">toDate</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#toLocalizedPattern-java.lang.String-java.util.Locale-">toLocalizedPattern</a>, <a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#toString--">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.velocity.tools.generic.FormatConfig">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/FormatConfig.html" title="class in org.apache.velocity.tools.generic">FormatConfig</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/FormatConfig.html#getFormat--">getFormat</a>, <a href="../../../../../org/apache/velocity/tools/generic/FormatConfig.html#setFormat-java.lang.String-">setFormat</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.velocity.tools.generic.LocaleConfig">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/LocaleConfig.html" title="class in org.apache.velocity.tools.generic">LocaleConfig</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/LocaleConfig.html#getLocale--">getLocale</a>, <a href="../../../../../org/apache/velocity/tools/generic/LocaleConfig.html#setLocale-java.util.Locale-">setLocale</a>, <a href="../../../../../org/apache/velocity/tools/generic/LocaleConfig.html#toLocale-java.lang.Object-">toLocale</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.velocity.tools.generic.SafeConfig">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html" title="class in org.apache.velocity.tools.generic">SafeConfig</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-java.util.Map-">configure</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#getLog--">getLog</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#initLogger-org.apache.velocity.tools.generic.ValueParser-">initLogger</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isConfigLocked--">isConfigLocked</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isSafeMode--">isSafeMode</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#setLockConfig-boolean-">setLockConfig</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#setSafeMode-boolean-">setSafeMode</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="MILLIS_PER_SECOND">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_SECOND</h4>
<pre>public static final&nbsp;long MILLIS_PER_SECOND</pre>
<div class="block">The number of milliseconds in a second.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MILLIS_PER_SECOND">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MILLIS_PER_MINUTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_MINUTE</h4>
<pre>public static final&nbsp;long MILLIS_PER_MINUTE</pre>
<div class="block">The number of millseconds in a minute.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MILLIS_PER_MINUTE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MILLIS_PER_HOUR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_HOUR</h4>
<pre>public static final&nbsp;long MILLIS_PER_HOUR</pre>
<div class="block">The number of milliseconds in an hour.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MILLIS_PER_HOUR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MILLIS_PER_DAY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_DAY</h4>
<pre>public static final&nbsp;long MILLIS_PER_DAY</pre>
<div class="block">The number of milliseconds in a day.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MILLIS_PER_DAY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MILLIS_PER_WEEK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_WEEK</h4>
<pre>public static final&nbsp;long MILLIS_PER_WEEK</pre>
<div class="block">The number of milliseconds in a week.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MILLIS_PER_WEEK">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MILLIS_PER_MONTH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_MONTH</h4>
<pre>public static final&nbsp;long MILLIS_PER_MONTH</pre>
<div class="block">An approximation of the number of milliseconds in a month.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MILLIS_PER_MONTH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MILLIS_PER_YEAR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLIS_PER_YEAR</h4>
<pre>public static final&nbsp;long MILLIS_PER_YEAR</pre>
<div class="block">An approximation of the number of milliseconds in a year.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MILLIS_PER_YEAR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="BUNDLE_NAME_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BUNDLE_NAME_KEY</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> BUNDLE_NAME_KEY</pre>
<div class="block">The key used for specifying a default locale via toolbox params.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.BUNDLE_NAME_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEPTH_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEPTH_KEY</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEPTH_KEY</pre>
<div class="block">The key used for specifying a different default depth via toolbox params.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.DEPTH_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SKIPPED_UNITS_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SKIPPED_UNITS_KEY</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SKIPPED_UNITS_KEY</pre>
<div class="block">The key used for specifying time units to be skipped over.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.SKIPPED_UNITS_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_BUNDLE_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_BUNDLE_NAME</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_BUNDLE_NAME</pre>
<div class="block">The default path of the relative format resource bundles.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.DEFAULT_BUNDLE_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MILLISECOND_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MILLISECOND_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> MILLISECOND_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MILLISECOND_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SECOND_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SECOND_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SECOND_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.SECOND_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MINUTE_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MINUTE_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> MINUTE_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MINUTE_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="HOUR_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOUR_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> HOUR_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.HOUR_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DAY_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DAY_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DAY_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.DAY_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="WEEK_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>WEEK_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> WEEK_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.WEEK_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MONTH_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MONTH_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> MONTH_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.MONTH_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="YEAR_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>YEAR_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> YEAR_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.YEAR_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="TIME_UNITS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TIME_UNITS</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> TIME_UNITS</pre>
<div class="block">Array of all time unit message keys to their millisecond conversion factor.</div>
</li>
</ul>
<a name="CURRENT_PREFIX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CURRENT_PREFIX</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> CURRENT_PREFIX</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.CURRENT_PREFIX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="AFTER_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>AFTER_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> AFTER_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.AFTER_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="BEFORE_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BEFORE_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> BEFORE_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.BEFORE_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="EQUAL_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EQUAL_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> EQUAL_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.EQUAL_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ZERO_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ZERO_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ZERO_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.ZERO_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ABBR_SUFFIX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ABBR_SUFFIX</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ABBR_SUFFIX</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.ABBR_SUFFIX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ONE_DAY_SUFFIX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ONE_DAY_SUFFIX</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ONE_DAY_SUFFIX</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.ONE_DAY_SUFFIX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="PLURAL_SUFFIX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PLURAL_SUFFIX</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> PLURAL_SUFFIX</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.PLURAL_SUFFIX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CURRENT_TYPE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CURRENT_TYPE</h4>
<pre>protected static final&nbsp;int CURRENT_TYPE</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.CURRENT_TYPE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="RELATIVE_TYPE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RELATIVE_TYPE</h4>
<pre>protected static final&nbsp;int RELATIVE_TYPE</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.RELATIVE_TYPE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DIFF_TYPE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DIFF_TYPE</h4>
<pre>protected static final&nbsp;int DIFF_TYPE</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.generic.ComparisonDateTool.DIFF_TYPE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ComparisonDateTool--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ComparisonDateTool</h4>
<pre>public&nbsp;ComparisonDateTool()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="configure-org.apache.velocity.tools.generic.ValueParser-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>configure</h4>
<pre>protected&nbsp;void&nbsp;configure(<a href="../../../../../org/apache/velocity/tools/generic/ValueParser.html" title="class in org.apache.velocity.tools.generic">ValueParser</a>&nbsp;values)</pre>
<div class="block">Calls the superclass implementation, then looks for a bundle name
and any time units to be skipped.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#configure-org.apache.velocity.tools.generic.ValueParser-">configure</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/velocity/tools/generic/DateTool.html" title="class in org.apache.velocity.tools.generic">DateTool</a></code></dd>
</dl>
</li>
</ul>
<a name="getText-java.lang.String-java.util.Locale-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getText</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getText(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;locale)</pre>
<div class="block">Retrieves the specified text resource.</div>
</li>
</ul>
<a name="toYears-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toYears</h4>
<pre>public static&nbsp;long&nbsp;toYears(long&nbsp;ms)</pre>
<div class="block">Returns the number of whole Years in the specified number of milliseconds.</div>
</li>
</ul>
<a name="toMonths-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toMonths</h4>
<pre>public static&nbsp;long&nbsp;toMonths(long&nbsp;ms)</pre>
<div class="block">Returns the number of whole Months in the specified number of milliseconds.</div>
</li>
</ul>
<a name="toWeeks-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toWeeks</h4>
<pre>public static&nbsp;long&nbsp;toWeeks(long&nbsp;ms)</pre>
<div class="block">Returns the number of whole Weeks in the specified number of milliseconds.</div>
</li>
</ul>
<a name="toDays-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDays</h4>
<pre>public static&nbsp;long&nbsp;toDays(long&nbsp;ms)</pre>
<div class="block">Returns the number of whole Days in the specified number of milliseconds.</div>
</li>
</ul>
<a name="toHours-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toHours</h4>
<pre>public static&nbsp;long&nbsp;toHours(long&nbsp;ms)</pre>
<div class="block">Returns the number of whole Hours in the specified number of milliseconds.</div>
</li>
</ul>
<a name="toMinutes-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toMinutes</h4>
<pre>public static&nbsp;long&nbsp;toMinutes(long&nbsp;ms)</pre>
<div class="block">Returns the number of whole Minutes in the specified number of milliseconds.</div>
</li>
</ul>
<a name="toSeconds-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toSeconds</h4>
<pre>public static&nbsp;long&nbsp;toSeconds(long&nbsp;ms)</pre>
<div class="block">Returns the number of whole Seconds in the specified number of milliseconds.</div>
</li>
</ul>
<a name="whenIs-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>whenIs</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic">ComparisonDateTool.Comparison</a>&nbsp;whenIs(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;then)</pre>
<div class="block">Returns a <a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic"><code>ComparisonDateTool.Comparison</code></a> between the result of
<a href="../../../../../org/apache/velocity/tools/generic/DateTool.html#getCalendar--"><code>DateTool.getCalendar()</code></a> and the specified date. The default
rendering of that Comparison will be the largest unit difference
between the dates followed by a description of their relative position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>then</code> - The date in question</dd>
</dl>
</li>
</ul>
<a name="whenIs-java.lang.Object-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>whenIs</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic">ComparisonDateTool.Comparison</a>&nbsp;whenIs(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;now,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;then)</pre>
<div class="block">Returns a <a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic"><code>ComparisonDateTool.Comparison</code></a> between the second specified date
and the first specified date. The default
rendering of that Comparison will be the largest unit difference
between the dates followed by a description of their relative position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>now</code> - The date to use as representative of "now"</dd>
<dd><code>then</code> - The date in question</dd>
</dl>
</li>
</ul>
<a name="difference-java.lang.Object-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>difference</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic">ComparisonDateTool.Comparison</a>&nbsp;difference(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;now,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;then)</pre>
<div class="block">Returns a <a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic"><code>ComparisonDateTool.Comparison</code></a> between the result of
the second specified date and the first specified date. The default
rendering of that Comparison will be the largest unit difference
between the dates.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>now</code> - The date to use as representative of "now"</dd>
<dd><code>then</code> - The secondary date</dd>
</dl>
</li>
</ul>
<a name="compare-java.lang.Object-java.lang.Object-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compare</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic">ComparisonDateTool.Comparison</a>&nbsp;compare(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;now,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;then,
int&nbsp;type)</pre>
</li>
</ul>
<a name="toString-long-int-int-boolean-java.util.Locale-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(long&nbsp;ms,
int&nbsp;type,
int&nbsp;depth,
boolean&nbsp;abbr,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;loc)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ms</code> - The time in milliseconds</dd>
<dd><code>type</code> - Whether the time should be represented as relative to "now",
relative to some other time, or as a mere difference.</dd>
<dd><code>depth</code> - The maximum number of units deep to show</dd>
<dd><code>abbr</code> - Whether the units should be abbreviated or not</dd>
<dd><code>loc</code> - The locale to be used when looking up resources</dd>
</dl>
</li>
</ul>
<a name="toString-long-int-boolean-java.util.Locale-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString(long&nbsp;diff,
int&nbsp;maxUnitDepth,
boolean&nbsp;abbreviate,
<a href="https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;locale)</pre>
<div class="block">Converts the specified positive duration of milliseconds into larger
units up to the specified number of positive units, beginning with the
largest positive unit. e.g.
<code>toString(181453, 3, false, null)</code> will return
"3 minutes 1 second 453 milliseconds",
<code>toString(181453, 2, false, null)</code> will return
"3 minutes 1 second", and
<code>toString(180000, 2, true, null)</code> will return
"3 min".</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ComparisonDateTool.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/velocity/tools/generic/CollectionTool.PropertiesComparator.html" title="class in org.apache.velocity.tools.generic"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/velocity/tools/generic/ComparisonDateTool.Comparison.html" title="class in org.apache.velocity.tools.generic"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/velocity/tools/generic/ComparisonDateTool.html" target="_top">Frames</a></li>
<li><a href="ComparisonDateTool.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>