blob: eb236bc40537fbfa7c16a5c7f2fb7df0e18a2dbe [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>DateTimeUtils (Apache Calcite Avatica API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DateTimeUtils (Apache Calcite Avatica API)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":41,"i16":9,"i17":41,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DateTimeUtils.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" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.avatica.util</a></div>
<h2 title="Class DateTimeUtils" class="title">Class DateTimeUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.avatica.util.DateTimeUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public class <span class="typeNameLabel">DateTimeUtils</span>
extends java.lang.Object</pre>
<div class="block">Utility functions for datetime types: date, time, timestamp.
<p>Used by the JDBC driver.
<p>TODO: review methods for performance. Due to allocations required, it may
be preferable to introduce a "formatter" with the required state.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DateTimeUtils.PrecisionTime.html" title="class in org.apache.calcite.avatica.util">DateTimeUtils.PrecisionTime</a></span></code></th>
<td class="colLast">
<div class="block">Helper class for <a href="#parsePrecisionDateTimeLiteral(java.lang.String,java.lang.String,java.util.TimeZone)"><code>parsePrecisionDateTimeLiteral(java.lang.String, java.lang.String, java.util.TimeZone)</code></a></div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DATE_FORMAT_STRING">DATE_FORMAT_STRING</a></span></code></th>
<td class="colLast">
<div class="block">The SimpleDateFormat string for ISO dates, "yyyy-MM-dd".</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.util.TimeZone</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_ZONE">DEFAULT_ZONE</a></span></code></th>
<td class="colLast">
<div class="block">The Java default time zone.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EPOCH_JULIAN">EPOCH_JULIAN</a></span></code></th>
<td class="colLast">
<div class="block">The julian date of the epoch, 1970-01-01.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.util.TimeZone</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#GMT_ZONE">GMT_ZONE</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#UTC_ZONE"><code>UTC_ZONE</code></a></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MILLIS_PER_DAY">MILLIS_PER_DAY</a></span></code></th>
<td class="colLast">
<div class="block">The number of milliseconds in a day.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MILLIS_PER_HOUR">MILLIS_PER_HOUR</a></span></code></th>
<td class="colLast">
<div class="block">The number of milliseconds in an hour.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MILLIS_PER_MINUTE">MILLIS_PER_MINUTE</a></span></code></th>
<td class="colLast">
<div class="block">The number of milliseconds in a minute.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MILLIS_PER_SECOND">MILLIS_PER_SECOND</a></span></code></th>
<td class="colLast">
<div class="block">The number of milliseconds in a second.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SECONDS_PER_DAY">SECONDS_PER_DAY</a></span></code></th>
<td class="colLast">
<div class="block">The number of seconds in a day.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TIME_FORMAT_STRING">TIME_FORMAT_STRING</a></span></code></th>
<td class="colLast">
<div class="block">The SimpleDateFormat string for ISO times, "HH:mm:ss".</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#TIMESTAMP_FORMAT_STRING">TIMESTAMP_FORMAT_STRING</a></span></code></th>
<td class="colLast">
<div class="block">The SimpleDateFormat string for ISO timestamps, "yyyy-MM-dd HH:mm:ss".</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.util.TimeZone</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#UTC_ZONE">UTC_ZONE</a></span></code></th>
<td class="colLast">
<div class="block">The UTC time zone.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.util.Calendar</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ZERO_CALENDAR">ZERO_CALENDAR</a></span></code></th>
<td class="colLast">
<div class="block">Calendar set to the epoch (1970-01-01 00:00:00 UTC).</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addMonths(int,int)">addMonths</a></span>&#8203;(int&nbsp;date,
int&nbsp;m)</code></th>
<td class="colLast">
<div class="block">Adds a given number of months to a date, represented as the number of
days since the epoch.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addMonths(long,int)">addMonths</a></span>&#8203;(long&nbsp;timestamp,
int&nbsp;m)</code></th>
<td class="colLast">
<div class="block">Adds a given number of months to a timestamp, represented as the number
of milliseconds since the epoch.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static java.util.Calendar</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#calendar()">calendar</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates an instance of <code>Calendar</code> in the root locale and UTC time
zone.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkDateFormat(java.lang.String)">checkDateFormat</a></span>&#8203;(java.lang.String&nbsp;pattern)</code></th>
<td class="colLast">
<div class="block">Checks if the date/time format is valid</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dateStringToUnixDate(java.lang.String)">dateStringToUnixDate</a></span>&#8203;(java.lang.String&nbsp;s)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#digitCount(int)">digitCount</a></span>&#8203;(int&nbsp;v)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#floorDiv(long,long)">floorDiv</a></span>&#8203;(long&nbsp;x,
long&nbsp;y)</code></th>
<td class="colLast">
<div class="block">Divide, rounding towards negative infinity.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#floorMod(long,long)">floorMod</a></span>&#8203;(long&nbsp;x,
long&nbsp;y)</code></th>
<td class="colLast">
<div class="block">Modulo, always returning a non-negative result.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static java.util.TimeZone</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTimeZone(java.util.Calendar)">getTimeZone</a></span>&#8203;(java.util.Calendar&nbsp;cal)</code></th>
<td class="colLast">
<div class="block">Gets the active time zone based on a Calendar argument</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intervalDayTimeToString(long,org.apache.calcite.avatica.util.TimeUnitRange,int)">intervalDayTimeToString</a></span>&#8203;(long&nbsp;v,
<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
int&nbsp;scale)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intervalYearMonthToString(int,org.apache.calcite.avatica.util.TimeUnitRange)">intervalYearMonthToString</a></span>&#8203;(int&nbsp;v,
<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isOffsetDateTime(java.lang.Object)">isOffsetDateTime</a></span>&#8203;(java.lang.Object&nbsp;o)</code></th>
<td class="colLast">
<div class="block">Returns whether a value is an <code>OffsetDateTime</code>.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static java.text.SimpleDateFormat</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newDateFormat(java.lang.String)">newDateFormat</a></span>&#8203;(java.lang.String&nbsp;format)</code></th>
<td class="colLast">
<div class="block">Creates a new date formatter with Farrago specific options.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static java.lang.StringBuilder</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#number(java.lang.StringBuilder,int,int)">number</a></span>&#8203;(java.lang.StringBuilder&nbsp;buf,
int&nbsp;v,
int&nbsp;n)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#offsetDateTimeValue(java.lang.Object)">offsetDateTimeValue</a></span>&#8203;(java.lang.Object&nbsp;o)</code></th>
<td class="colLast">
<div class="block">Returns the value of a <code>OffsetDateTime</code> as a string.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static java.util.Calendar</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseDateFormat(java.lang.String,java.lang.String,java.util.TimeZone)">parseDateFormat</a></span>&#8203;(java.lang.String&nbsp;s,
java.lang.String&nbsp;pattern,
java.util.TimeZone&nbsp;tz)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static java.util.Calendar</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseDateFormat(java.lang.String,java.text.DateFormat,java.util.TimeZone)">parseDateFormat</a></span>&#8203;(java.lang.String&nbsp;s,
java.text.DateFormat&nbsp;dateFormat,
java.util.TimeZone&nbsp;tz)</code></th>
<td class="colLast">
<div class="block">Parses a string using <code>SimpleDateFormat</code> and a given pattern.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="DateTimeUtils.PrecisionTime.html" title="class in org.apache.calcite.avatica.util">DateTimeUtils.PrecisionTime</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parsePrecisionDateTimeLiteral(java.lang.String,java.lang.String,java.util.TimeZone)">parsePrecisionDateTimeLiteral</a></span>&#8203;(java.lang.String&nbsp;s,
java.lang.String&nbsp;pattern,
java.util.TimeZone&nbsp;tz)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static <a href="DateTimeUtils.PrecisionTime.html" title="class in org.apache.calcite.avatica.util">DateTimeUtils.PrecisionTime</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parsePrecisionDateTimeLiteral(java.lang.String,java.text.DateFormat,java.util.TimeZone,int)">parsePrecisionDateTimeLiteral</a></span>&#8203;(java.lang.String&nbsp;s,
java.text.DateFormat&nbsp;dateFormat,
java.util.TimeZone&nbsp;tz,
int&nbsp;maxPrecision)</code></th>
<td class="colLast">
<div class="block">Parses a string using <code>SimpleDateFormat</code> and a given pattern, and
if present, parses a fractional seconds component.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#powerX(long,long)">powerX</a></span>&#8203;(long&nbsp;a,
long&nbsp;b)</code></th>
<td class="colLast">
<div class="block">Cheap, unsafe, long power.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetDate(long)">resetDate</a></span>&#8203;(long&nbsp;timestamp)</code></th>
<td class="colLast">
<div class="block">Resets to epoch (1970-01-01) the "date" part of a timestamp.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetTime(long)">resetTime</a></span>&#8203;(long&nbsp;timestamp)</code></th>
<td class="colLast">
<div class="block">Resets to zero the "time" part of a timestamp.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subtractMonths(int,int)">subtractMonths</a></span>&#8203;(int&nbsp;date0,
int&nbsp;date1)</code></th>
<td class="colLast">
<div class="block">Finds the number of months between two dates, each represented as the
number of days since the epoch.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subtractMonths(long,long)">subtractMonths</a></span>&#8203;(long&nbsp;t0,
long&nbsp;t1)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#timestampStringToUnixDate(java.lang.String)">timestampStringToUnixDate</a></span>&#8203;(java.lang.String&nbsp;s)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#timeStringToUnixDate(java.lang.String)">timeStringToUnixDate</a></span>&#8203;(java.lang.String&nbsp;v)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#timeStringToUnixDate(java.lang.String,int)">timeStringToUnixDate</a></span>&#8203;(java.lang.String&nbsp;v,
int&nbsp;start)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixDateCeil(org.apache.calcite.avatica.util.TimeUnitRange,long)">unixDateCeil</a></span>&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;date)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixDateExtract(org.apache.calcite.avatica.util.TimeUnitRange,long)">unixDateExtract</a></span>&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;date)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixDateFloor(org.apache.calcite.avatica.util.TimeUnitRange,long)">unixDateFloor</a></span>&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;date)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixDateToString(int)">unixDateToString</a></span>&#8203;(int&nbsp;date)</code></th>
<td class="colLast">
<div class="block">Helper for CAST({date} AS VARCHAR(n)).</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixTimeExtract(org.apache.calcite.avatica.util.TimeUnitRange,int)">unixTimeExtract</a></span>&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
int&nbsp;time)</code></th>
<td class="colLast">
<div class="block">Extracts a time unit from a time value (milliseconds since midnight).</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixTimestamp(int,int,int,int,int,int)">unixTimestamp</a></span>&#8203;(int&nbsp;year,
int&nbsp;month,
int&nbsp;day,
int&nbsp;hour,
int&nbsp;minute,
int&nbsp;second)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixTimestampCeil(org.apache.calcite.avatica.util.TimeUnitRange,long)">unixTimestampCeil</a></span>&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;timestamp)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixTimestampExtract(org.apache.calcite.avatica.util.TimeUnitRange,long)">unixTimestampExtract</a></span>&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;timestamp)</code></th>
<td class="colLast">
<div class="block">Extracts a time unit from a UNIX date (milliseconds since epoch).</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixTimestampFloor(org.apache.calcite.avatica.util.TimeUnitRange,long)">unixTimestampFloor</a></span>&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;timestamp)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixTimestampToString(long)">unixTimestampToString</a></span>&#8203;(long&nbsp;timestamp)</code></th>
<td class="colLast">
<div class="block">Helper for CAST({timestamp} AS VARCHAR(n)).</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixTimestampToString(long,int)">unixTimestampToString</a></span>&#8203;(long&nbsp;timestamp,
int&nbsp;precision)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixTimeToString(int)">unixTimeToString</a></span>&#8203;(int&nbsp;time)</code></th>
<td class="colLast">
<div class="block">Helper for CAST({timestamp} AS VARCHAR(n)).</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unixTimeToString(int,int)">unixTimeToString</a></span>&#8203;(int&nbsp;time,
int&nbsp;precision)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ymdToJulian(int,int,int)">ymdToJulian</a></span>&#8203;(int&nbsp;year,
int&nbsp;month,
int&nbsp;day)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ymdToUnixDate(int,int,int)">ymdToUnixDate</a></span>&#8203;(int&nbsp;year,
int&nbsp;month,
int&nbsp;day)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="EPOCH_JULIAN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EPOCH_JULIAN</h4>
<pre>public static final&nbsp;int EPOCH_JULIAN</pre>
<div class="block">The julian date of the epoch, 1970-01-01.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.calcite.avatica.util.DateTimeUtils.EPOCH_JULIAN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="DATE_FORMAT_STRING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DATE_FORMAT_STRING</h4>
<pre>public static final&nbsp;java.lang.String DATE_FORMAT_STRING</pre>
<div class="block">The SimpleDateFormat string for ISO dates, "yyyy-MM-dd".</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.calcite.avatica.util.DateTimeUtils.DATE_FORMAT_STRING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TIME_FORMAT_STRING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TIME_FORMAT_STRING</h4>
<pre>public static final&nbsp;java.lang.String TIME_FORMAT_STRING</pre>
<div class="block">The SimpleDateFormat string for ISO times, "HH:mm:ss".</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.calcite.avatica.util.DateTimeUtils.TIME_FORMAT_STRING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="TIMESTAMP_FORMAT_STRING">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TIMESTAMP_FORMAT_STRING</h4>
<pre>public static final&nbsp;java.lang.String TIMESTAMP_FORMAT_STRING</pre>
<div class="block">The SimpleDateFormat string for ISO timestamps, "yyyy-MM-dd HH:mm:ss".</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.calcite.avatica.util.DateTimeUtils.TIMESTAMP_FORMAT_STRING">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="GMT_ZONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>GMT_ZONE</h4>
<pre>@Deprecated
public static final&nbsp;java.util.TimeZone GMT_ZONE</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#UTC_ZONE"><code>UTC_ZONE</code></a></div>
</div>
<div class="block">The GMT time zone.</div>
</li>
</ul>
<a id="UTC_ZONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UTC_ZONE</h4>
<pre>public static final&nbsp;java.util.TimeZone UTC_ZONE</pre>
<div class="block">The UTC time zone.</div>
</li>
</ul>
<a id="DEFAULT_ZONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ZONE</h4>
<pre>public static final&nbsp;java.util.TimeZone DEFAULT_ZONE</pre>
<div class="block">The Java default time zone.</div>
</li>
</ul>
<a id="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.calcite.avatica.util.DateTimeUtils.MILLIS_PER_SECOND">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="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 milliseconds in a minute.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.calcite.avatica.util.DateTimeUtils.MILLIS_PER_MINUTE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="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.calcite.avatica.util.DateTimeUtils.MILLIS_PER_HOUR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="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.
<p>This is the modulo 'mask' used when converting
TIMESTAMP values to DATE and TIME values.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.calcite.avatica.util.DateTimeUtils.MILLIS_PER_DAY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SECONDS_PER_DAY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SECONDS_PER_DAY</h4>
<pre>public static final&nbsp;long SECONDS_PER_DAY</pre>
<div class="block">The number of seconds in a day.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.calcite.avatica.util.DateTimeUtils.SECONDS_PER_DAY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="ZERO_CALENDAR">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ZERO_CALENDAR</h4>
<pre>public static final&nbsp;java.util.Calendar ZERO_CALENDAR</pre>
<div class="block">Calendar set to the epoch (1970-01-01 00:00:00 UTC). Useful for
initializing other values. Calendars are not immutable, so be careful not
to screw up this object for everyone else.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="parseDateFormat(java.lang.String,java.lang.String,java.util.TimeZone)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseDateFormat</h4>
<pre class="methodSignature">@Deprecated
public static&nbsp;java.util.Calendar&nbsp;parseDateFormat&#8203;(java.lang.String&nbsp;s,
java.lang.String&nbsp;pattern,
java.util.TimeZone&nbsp;tz)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
</li>
</ul>
<a id="parseDateFormat(java.lang.String,java.text.DateFormat,java.util.TimeZone)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseDateFormat</h4>
<pre class="methodSignature">public static&nbsp;java.util.Calendar&nbsp;parseDateFormat&#8203;(java.lang.String&nbsp;s,
java.text.DateFormat&nbsp;dateFormat,
java.util.TimeZone&nbsp;tz)</pre>
<div class="block">Parses a string using <code>SimpleDateFormat</code> and a given pattern. The
entire string must match the pattern specified.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>s</code> - string to be parsed</dd>
<dd><code>dateFormat</code> - Date format</dd>
<dd><code>tz</code> - time zone in which to interpret string. Defaults to the Java
default time zone</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a Calendar initialized with the parsed value, or null if parsing
failed. If returned, the Calendar is configured to the UTC time zone.</dd>
</dl>
</li>
</ul>
<a id="parsePrecisionDateTimeLiteral(java.lang.String,java.lang.String,java.util.TimeZone)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parsePrecisionDateTimeLiteral</h4>
<pre class="methodSignature">@Deprecated
public static&nbsp;<a href="DateTimeUtils.PrecisionTime.html" title="class in org.apache.calcite.avatica.util">DateTimeUtils.PrecisionTime</a>&nbsp;parsePrecisionDateTimeLiteral&#8203;(java.lang.String&nbsp;s,
java.lang.String&nbsp;pattern,
java.util.TimeZone&nbsp;tz)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
</li>
</ul>
<a id="parsePrecisionDateTimeLiteral(java.lang.String,java.text.DateFormat,java.util.TimeZone,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parsePrecisionDateTimeLiteral</h4>
<pre class="methodSignature">public static&nbsp;<a href="DateTimeUtils.PrecisionTime.html" title="class in org.apache.calcite.avatica.util">DateTimeUtils.PrecisionTime</a>&nbsp;parsePrecisionDateTimeLiteral&#8203;(java.lang.String&nbsp;s,
java.text.DateFormat&nbsp;dateFormat,
java.util.TimeZone&nbsp;tz,
int&nbsp;maxPrecision)</pre>
<div class="block">Parses a string using <code>SimpleDateFormat</code> and a given pattern, and
if present, parses a fractional seconds component. The fractional seconds
component must begin with a decimal point ('.') followed by numeric
digits. The precision is rounded to a maximum of 3 digits of fractional
seconds precision (to obtain milliseconds).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>s</code> - string to be parsed</dd>
<dd><code>dateFormat</code> - Date format</dd>
<dd><code>tz</code> - time zone in which to interpret string. Defaults to the
local time zone</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="DateTimeUtils.PrecisionTime.html" title="class in org.apache.calcite.avatica.util"><code>PrecisionTime</code></a> initialized
with the parsed value, or null if parsing failed. The PrecisionTime
contains a GMT Calendar and a precision.</dd>
</dl>
</li>
</ul>
<a id="getTimeZone(java.util.Calendar)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimeZone</h4>
<pre class="methodSignature">public static&nbsp;java.util.TimeZone&nbsp;getTimeZone&#8203;(java.util.Calendar&nbsp;cal)</pre>
<div class="block">Gets the active time zone based on a Calendar argument</div>
</li>
</ul>
<a id="checkDateFormat(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkDateFormat</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;checkDateFormat&#8203;(java.lang.String&nbsp;pattern)</pre>
<div class="block">Checks if the date/time format is valid</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pattern</code> - <code>SimpleDateFormat</code> pattern</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the given pattern is invalid</dd>
</dl>
</li>
</ul>
<a id="newDateFormat(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newDateFormat</h4>
<pre class="methodSignature">public static&nbsp;java.text.SimpleDateFormat&nbsp;newDateFormat&#8203;(java.lang.String&nbsp;format)</pre>
<div class="block">Creates a new date formatter with Farrago specific options. Farrago
parsing is strict and does not allow values such as day 0, month 13, etc.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>format</code> - <code>SimpleDateFormat</code> pattern</dd>
</dl>
</li>
</ul>
<a id="unixTimestampToString(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixTimestampToString</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;unixTimestampToString&#8203;(long&nbsp;timestamp)</pre>
<div class="block">Helper for CAST({timestamp} AS VARCHAR(n)).</div>
</li>
</ul>
<a id="unixTimestampToString(long,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixTimestampToString</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;unixTimestampToString&#8203;(long&nbsp;timestamp,
int&nbsp;precision)</pre>
</li>
</ul>
<a id="unixTimeToString(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixTimeToString</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;unixTimeToString&#8203;(int&nbsp;time)</pre>
<div class="block">Helper for CAST({timestamp} AS VARCHAR(n)).</div>
</li>
</ul>
<a id="unixTimeToString(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixTimeToString</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;unixTimeToString&#8203;(int&nbsp;time,
int&nbsp;precision)</pre>
</li>
</ul>
<a id="unixDateToString(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixDateToString</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;unixDateToString&#8203;(int&nbsp;date)</pre>
<div class="block">Helper for CAST({date} AS VARCHAR(n)).</div>
</li>
</ul>
<a id="intervalYearMonthToString(int,org.apache.calcite.avatica.util.TimeUnitRange)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intervalYearMonthToString</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;intervalYearMonthToString&#8203;(int&nbsp;v,
<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range)</pre>
</li>
</ul>
<a id="number(java.lang.StringBuilder,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>number</h4>
<pre class="methodSignature">public static&nbsp;java.lang.StringBuilder&nbsp;number&#8203;(java.lang.StringBuilder&nbsp;buf,
int&nbsp;v,
int&nbsp;n)</pre>
</li>
</ul>
<a id="digitCount(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>digitCount</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;digitCount&#8203;(int&nbsp;v)</pre>
</li>
</ul>
<a id="powerX(long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>powerX</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;powerX&#8203;(long&nbsp;a,
long&nbsp;b)</pre>
<div class="block">Cheap, unsafe, long power. power(2, 3) returns 8.</div>
</li>
</ul>
<a id="intervalDayTimeToString(long,org.apache.calcite.avatica.util.TimeUnitRange,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intervalDayTimeToString</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;intervalDayTimeToString&#8203;(long&nbsp;v,
<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
int&nbsp;scale)</pre>
</li>
</ul>
<a id="dateStringToUnixDate(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dateStringToUnixDate</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;dateStringToUnixDate&#8203;(java.lang.String&nbsp;s)</pre>
</li>
</ul>
<a id="timeStringToUnixDate(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timeStringToUnixDate</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;timeStringToUnixDate&#8203;(java.lang.String&nbsp;v)</pre>
</li>
</ul>
<a id="timeStringToUnixDate(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timeStringToUnixDate</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;timeStringToUnixDate&#8203;(java.lang.String&nbsp;v,
int&nbsp;start)</pre>
</li>
</ul>
<a id="timestampStringToUnixDate(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timestampStringToUnixDate</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;timestampStringToUnixDate&#8203;(java.lang.String&nbsp;s)</pre>
</li>
</ul>
<a id="unixDateExtract(org.apache.calcite.avatica.util.TimeUnitRange,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixDateExtract</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;unixDateExtract&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;date)</pre>
</li>
</ul>
<a id="unixTimestampExtract(org.apache.calcite.avatica.util.TimeUnitRange,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixTimestampExtract</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;unixTimestampExtract&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;timestamp)</pre>
<div class="block">Extracts a time unit from a UNIX date (milliseconds since epoch).</div>
</li>
</ul>
<a id="unixTimeExtract(org.apache.calcite.avatica.util.TimeUnitRange,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixTimeExtract</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;unixTimeExtract&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
int&nbsp;time)</pre>
<div class="block">Extracts a time unit from a time value (milliseconds since midnight).</div>
</li>
</ul>
<a id="resetTime(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetTime</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;resetTime&#8203;(long&nbsp;timestamp)</pre>
<div class="block">Resets to zero the "time" part of a timestamp.</div>
</li>
</ul>
<a id="resetDate(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetDate</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;resetDate&#8203;(long&nbsp;timestamp)</pre>
<div class="block">Resets to epoch (1970-01-01) the "date" part of a timestamp.</div>
</li>
</ul>
<a id="unixTimestampFloor(org.apache.calcite.avatica.util.TimeUnitRange,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixTimestampFloor</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;unixTimestampFloor&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;timestamp)</pre>
</li>
</ul>
<a id="unixDateFloor(org.apache.calcite.avatica.util.TimeUnitRange,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixDateFloor</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;unixDateFloor&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;date)</pre>
</li>
</ul>
<a id="unixTimestampCeil(org.apache.calcite.avatica.util.TimeUnitRange,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixTimestampCeil</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;unixTimestampCeil&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;timestamp)</pre>
</li>
</ul>
<a id="unixDateCeil(org.apache.calcite.avatica.util.TimeUnitRange,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixDateCeil</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;unixDateCeil&#8203;(<a href="TimeUnitRange.html" title="enum in org.apache.calcite.avatica.util">TimeUnitRange</a>&nbsp;range,
long&nbsp;date)</pre>
</li>
</ul>
<a id="ymdToUnixDate(int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ymdToUnixDate</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;ymdToUnixDate&#8203;(int&nbsp;year,
int&nbsp;month,
int&nbsp;day)</pre>
</li>
</ul>
<a id="ymdToJulian(int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ymdToJulian</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;ymdToJulian&#8203;(int&nbsp;year,
int&nbsp;month,
int&nbsp;day)</pre>
</li>
</ul>
<a id="unixTimestamp(int,int,int,int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unixTimestamp</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;unixTimestamp&#8203;(int&nbsp;year,
int&nbsp;month,
int&nbsp;day,
int&nbsp;hour,
int&nbsp;minute,
int&nbsp;second)</pre>
</li>
</ul>
<a id="addMonths(long,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMonths</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;addMonths&#8203;(long&nbsp;timestamp,
int&nbsp;m)</pre>
<div class="block">Adds a given number of months to a timestamp, represented as the number
of milliseconds since the epoch.</div>
</li>
</ul>
<a id="addMonths(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMonths</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;addMonths&#8203;(int&nbsp;date,
int&nbsp;m)</pre>
<div class="block">Adds a given number of months to a date, represented as the number of
days since the epoch.</div>
</li>
</ul>
<a id="subtractMonths(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subtractMonths</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;subtractMonths&#8203;(int&nbsp;date0,
int&nbsp;date1)</pre>
<div class="block">Finds the number of months between two dates, each represented as the
number of days since the epoch.</div>
</li>
</ul>
<a id="subtractMonths(long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subtractMonths</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;subtractMonths&#8203;(long&nbsp;t0,
long&nbsp;t1)</pre>
</li>
</ul>
<a id="floorDiv(long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>floorDiv</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;floorDiv&#8203;(long&nbsp;x,
long&nbsp;y)</pre>
<div class="block">Divide, rounding towards negative infinity.</div>
</li>
</ul>
<a id="floorMod(long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>floorMod</h4>
<pre class="methodSignature">public static&nbsp;long&nbsp;floorMod&#8203;(long&nbsp;x,
long&nbsp;y)</pre>
<div class="block">Modulo, always returning a non-negative result.</div>
</li>
</ul>
<a id="calendar()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calendar</h4>
<pre class="methodSignature">public static&nbsp;java.util.Calendar&nbsp;calendar()</pre>
<div class="block">Creates an instance of <code>Calendar</code> in the root locale and UTC time
zone.</div>
</li>
</ul>
<a id="isOffsetDateTime(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOffsetDateTime</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isOffsetDateTime&#8203;(java.lang.Object&nbsp;o)</pre>
<div class="block">Returns whether a value is an <code>OffsetDateTime</code>.</div>
</li>
</ul>
<a id="offsetDateTimeValue(java.lang.Object)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>offsetDateTimeValue</h4>
<pre class="methodSignature">public static&nbsp;java.lang.String&nbsp;offsetDateTimeValue&#8203;(java.lang.Object&nbsp;o)</pre>
<div class="block">Returns the value of a <code>OffsetDateTime</code> as a string.</div>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DateTimeUtils.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" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2012&#x2013;2019 <a href="https://www.apache.org">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>