• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!-- NewPage -->
3<html lang="en">
4<head>
5<!-- Generated by javadoc (version 1.7.0_79) on Fri Jan 15 20:28:44 PST 2016 -->
6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<title>ISO8601Utils (jackson-databind 2.7.0 API)</title>
8<meta name="date" content="2016-01-15">
9<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
10</head>
11<body>
12<script type="text/javascript"><!--
13    if (location.href.indexOf('is-external=true') == -1) {
14        parent.document.title="ISO8601Utils (jackson-databind 2.7.0 API)";
15    }
16//-->
17</script>
18<noscript>
19<div>JavaScript is disabled on your browser.</div>
20</noscript>
21<!-- ========= START OF TOP NAVBAR ======= -->
22<div class="topNav"><a name="navbar_top">
23<!--   -->
24</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
25<!--   -->
26</a>
27<ul class="navList" title="Navigation">
28<li><a href="../../../../../overview-summary.html">Overview</a></li>
29<li><a href="package-summary.html">Package</a></li>
30<li class="navBarCell1Rev">Class</li>
31<li><a href="class-use/ISO8601Utils.html">Use</a></li>
32<li><a href="package-tree.html">Tree</a></li>
33<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
34<li><a href="../../../../../index-all.html">Index</a></li>
35<li><a href="../../../../../help-doc.html">Help</a></li>
36</ul>
37</div>
38<div class="subNav">
39<ul class="navList">
40<li><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601DateFormat.html" title="class in com.fasterxml.jackson.databind.util"><span class="strong">Prev Class</span></a></li>
41<li><a href="../../../../../com/fasterxml/jackson/databind/util/JSONPObject.html" title="class in com.fasterxml.jackson.databind.util"><span class="strong">Next Class</span></a></li>
42</ul>
43<ul class="navList">
44<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/util/ISO8601Utils.html" target="_top">Frames</a></li>
45<li><a href="ISO8601Utils.html" target="_top">No Frames</a></li>
46</ul>
47<ul class="navList" id="allclasses_navbar_top">
48<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
49</ul>
50<div>
51<script type="text/javascript"><!--
52  allClassesLink = document.getElementById("allclasses_navbar_top");
53  if(window==top) {
54    allClassesLink.style.display = "block";
55  }
56  else {
57    allClassesLink.style.display = "none";
58  }
59  //-->
60</script>
61</div>
62<div>
63<ul class="subNavList">
64<li>Summary:&nbsp;</li>
65<li>Nested&nbsp;|&nbsp;</li>
66<li>Field&nbsp;|&nbsp;</li>
67<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
68<li><a href="#method_summary">Method</a></li>
69</ul>
70<ul class="subNavList">
71<li>Detail:&nbsp;</li>
72<li>Field&nbsp;|&nbsp;</li>
73<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
74<li><a href="#method_detail">Method</a></li>
75</ul>
76</div>
77<a name="skip-navbar_top">
78<!--   -->
79</a></div>
80<!-- ========= END OF TOP NAVBAR ========= -->
81<!-- ======== START OF CLASS DATA ======== -->
82<div class="header">
83<div class="subTitle">com.fasterxml.jackson.databind.util</div>
84<h2 title="Class ISO8601Utils" class="title">Class ISO8601Utils</h2>
85</div>
86<div class="contentContainer">
87<ul class="inheritance">
88<li><a href="http://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>
89<li>
90<ul class="inheritance">
91<li>com.fasterxml.jackson.databind.util.ISO8601Utils</li>
92</ul>
93</li>
94</ul>
95<div class="description">
96<ul class="blockList">
97<li class="blockList">
98<hr>
99<br>
100<pre>public class <span class="strong">ISO8601Utils</span>
101extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
102<div class="block">Utilities methods for manipulating dates in iso8601 format. This is much much faster and GC friendly than using SimpleDateFormat so
103 highly suitable if you (un)serialize lots of date objects.
104
105 Supported parse format: [yyyy-MM-dd|yyyyMMdd][T(hh:mm[:ss[.sss]]|hhmm[ss[.sss]])]?[Z|[+-]hh[:]mm]]</div>
106<dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://www.w3.org/TR/NOTE-datetime">this specification</a></dd></dl>
107</li>
108</ul>
109</div>
110<div class="summary">
111<ul class="blockList">
112<li class="blockList">
113<!-- ======== CONSTRUCTOR SUMMARY ======== -->
114<ul class="blockList">
115<li class="blockList"><a name="constructor_summary">
116<!--   -->
117</a>
118<h3>Constructor Summary</h3>
119<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
120<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
121<tr>
122<th class="colOne" scope="col">Constructor and Description</th>
123</tr>
124<tr class="altColor">
125<td class="colOne"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#ISO8601Utils()">ISO8601Utils</a></strong>()</code>&nbsp;</td>
126</tr>
127</table>
128</li>
129</ul>
130<!-- ========== METHOD SUMMARY =========== -->
131<ul class="blockList">
132<li class="blockList"><a name="method_summary">
133<!--   -->
134</a>
135<h3>Method Summary</h3>
136<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
137<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
138<tr>
139<th class="colFirst" scope="col">Modifier and Type</th>
140<th class="colLast" scope="col">Method and Description</th>
141</tr>
142<tr class="altColor">
143<td class="colFirst"><code>static <a href="http://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>
144<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#format(java.util.Date)">format</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date)</code>
145<div class="block">Format a date into 'yyyy-MM-ddThh:mm:ssZ' (default timezone, no milliseconds precision)</div>
146</td>
147</tr>
148<tr class="rowColor">
149<td class="colFirst"><code>static <a href="http://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>
150<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#format(java.util.Date,%20boolean)">format</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
151      boolean&nbsp;millis)</code>
152<div class="block">Format a date into 'yyyy-MM-ddThh:mm:ss[.sss]Z' (GMT timezone)</div>
153</td>
154</tr>
155<tr class="altColor">
156<td class="colFirst"><code>static <a href="http://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>
157<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#format(java.util.Date,%20boolean,%20java.util.TimeZone)">format</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
158      boolean&nbsp;millis,
159      <a href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a>&nbsp;tz)</code>
160<div class="block">Format date into yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]</div>
161</td>
162</tr>
163<tr class="rowColor">
164<td class="colFirst"><code>static void</code></td>
165<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#main(java.lang.String[])">main</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;args)</code>&nbsp;</td>
166</tr>
167<tr class="altColor">
168<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td>
169<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#parse(java.lang.String,%20java.text.ParsePosition)">parse</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;date,
170     <a href="http://docs.oracle.com/javase/7/docs/api/java/text/ParsePosition.html?is-external=true" title="class or interface in java.text">ParsePosition</a>&nbsp;pos)</code>
171<div class="block">Parse a date from ISO-8601 formatted string.</div>
172</td>
173</tr>
174<tr class="rowColor">
175<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a></code></td>
176<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#timeZoneGMT()">timeZoneGMT</a></strong>()</code>
177<div class="block"><strong>Deprecated.</strong>&nbsp;
178<div class="block"><i>since 2.6</i></div>
179</div>
180</td>
181</tr>
182</table>
183<ul class="blockList">
184<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
185<!--   -->
186</a>
187<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
188<code><a href="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://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="http://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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
189</ul>
190</li>
191</ul>
192</li>
193</ul>
194</div>
195<div class="details">
196<ul class="blockList">
197<li class="blockList">
198<!-- ========= CONSTRUCTOR DETAIL ======== -->
199<ul class="blockList">
200<li class="blockList"><a name="constructor_detail">
201<!--   -->
202</a>
203<h3>Constructor Detail</h3>
204<a name="ISO8601Utils()">
205<!--   -->
206</a>
207<ul class="blockListLast">
208<li class="blockList">
209<h4>ISO8601Utils</h4>
210<pre>public&nbsp;ISO8601Utils()</pre>
211</li>
212</ul>
213</li>
214</ul>
215<!-- ============ METHOD DETAIL ========== -->
216<ul class="blockList">
217<li class="blockList"><a name="method_detail">
218<!--   -->
219</a>
220<h3>Method Detail</h3>
221<a name="timeZoneGMT()">
222<!--   -->
223</a>
224<ul class="blockList">
225<li class="blockList">
226<h4>timeZoneGMT</h4>
227<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
228public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a>&nbsp;timeZoneGMT()</pre>
229<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>since 2.6</i></div>
230<div class="block">Accessor for static GMT timezone instance.</div>
231</li>
232</ul>
233<a name="format(java.util.Date)">
234<!--   -->
235</a>
236<ul class="blockList">
237<li class="blockList">
238<h4>format</h4>
239<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;format(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date)</pre>
240<div class="block">Format a date into 'yyyy-MM-ddThh:mm:ssZ' (default timezone, no milliseconds precision)</div>
241<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to format</dd>
242<dt><span class="strong">Returns:</span></dt><dd>the date formatted as 'yyyy-MM-ddThh:mm:ssZ'</dd></dl>
243</li>
244</ul>
245<a name="format(java.util.Date, boolean)">
246<!--   -->
247</a>
248<ul class="blockList">
249<li class="blockList">
250<h4>format</h4>
251<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;format(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
252            boolean&nbsp;millis)</pre>
253<div class="block">Format a date into 'yyyy-MM-ddThh:mm:ss[.sss]Z' (GMT timezone)</div>
254<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to format</dd><dd><code>millis</code> - true to include millis precision otherwise false</dd>
255<dt><span class="strong">Returns:</span></dt><dd>the date formatted as 'yyyy-MM-ddThh:mm:ss[.sss]Z'</dd></dl>
256</li>
257</ul>
258<a name="format(java.util.Date, boolean, java.util.TimeZone)">
259<!--   -->
260</a>
261<ul class="blockList">
262<li class="blockList">
263<h4>format</h4>
264<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;format(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;date,
265            boolean&nbsp;millis,
266            <a href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a>&nbsp;tz)</pre>
267<div class="block">Format date into yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]</div>
268<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to format</dd><dd><code>millis</code> - true to include millis precision otherwise false</dd><dd><code>tz</code> - timezone to use for the formatting (UTC will produce 'Z')</dd>
269<dt><span class="strong">Returns:</span></dt><dd>the date formatted as yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]</dd></dl>
270</li>
271</ul>
272<a name="parse(java.lang.String, java.text.ParsePosition)">
273<!--   -->
274</a>
275<ul class="blockList">
276<li class="blockList">
277<h4>parse</h4>
278<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;parse(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;date,
279         <a href="http://docs.oracle.com/javase/7/docs/api/java/text/ParsePosition.html?is-external=true" title="class or interface in java.text">ParsePosition</a>&nbsp;pos)
280                  throws <a href="http://docs.oracle.com/javase/7/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></pre>
281<div class="block">Parse a date from ISO-8601 formatted string. It expects a format
282 [yyyy-MM-dd|yyyyMMdd][T(hh:mm[:ss[.sss]]|hhmm[ss[.sss]])]?[Z|[+-]hh:mm]]</div>
283<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - ISO string to parse in the appropriate format.</dd><dd><code>pos</code> - The position to start parsing from, updated to where parsing stopped.</dd>
284<dt><span class="strong">Returns:</span></dt><dd>the parsed date</dd>
285<dt><span class="strong">Throws:</span></dt>
286<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></code> - if the date is not in the appropriate format</dd></dl>
287</li>
288</ul>
289<a name="main(java.lang.String[])">
290<!--   -->
291</a>
292<ul class="blockListLast">
293<li class="blockList">
294<h4>main</h4>
295<pre>public static&nbsp;void&nbsp;main(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;args)</pre>
296</li>
297</ul>
298</li>
299</ul>
300</li>
301</ul>
302</div>
303</div>
304<!-- ========= END OF CLASS DATA ========= -->
305<!-- ======= START OF BOTTOM NAVBAR ====== -->
306<div class="bottomNav"><a name="navbar_bottom">
307<!--   -->
308</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
309<!--   -->
310</a>
311<ul class="navList" title="Navigation">
312<li><a href="../../../../../overview-summary.html">Overview</a></li>
313<li><a href="package-summary.html">Package</a></li>
314<li class="navBarCell1Rev">Class</li>
315<li><a href="class-use/ISO8601Utils.html">Use</a></li>
316<li><a href="package-tree.html">Tree</a></li>
317<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
318<li><a href="../../../../../index-all.html">Index</a></li>
319<li><a href="../../../../../help-doc.html">Help</a></li>
320</ul>
321</div>
322<div class="subNav">
323<ul class="navList">
324<li><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601DateFormat.html" title="class in com.fasterxml.jackson.databind.util"><span class="strong">Prev Class</span></a></li>
325<li><a href="../../../../../com/fasterxml/jackson/databind/util/JSONPObject.html" title="class in com.fasterxml.jackson.databind.util"><span class="strong">Next Class</span></a></li>
326</ul>
327<ul class="navList">
328<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/util/ISO8601Utils.html" target="_top">Frames</a></li>
329<li><a href="ISO8601Utils.html" target="_top">No Frames</a></li>
330</ul>
331<ul class="navList" id="allclasses_navbar_bottom">
332<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
333</ul>
334<div>
335<script type="text/javascript"><!--
336  allClassesLink = document.getElementById("allclasses_navbar_bottom");
337  if(window==top) {
338    allClassesLink.style.display = "block";
339  }
340  else {
341    allClassesLink.style.display = "none";
342  }
343  //-->
344</script>
345</div>
346<div>
347<ul class="subNavList">
348<li>Summary:&nbsp;</li>
349<li>Nested&nbsp;|&nbsp;</li>
350<li>Field&nbsp;|&nbsp;</li>
351<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
352<li><a href="#method_summary">Method</a></li>
353</ul>
354<ul class="subNavList">
355<li>Detail:&nbsp;</li>
356<li>Field&nbsp;|&nbsp;</li>
357<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
358<li><a href="#method_detail">Method</a></li>
359</ul>
360</div>
361<a name="skip-navbar_bottom">
362<!--   -->
363</a></div>
364<!-- ======== END OF BOTTOM NAVBAR ======= -->
365<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2016 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p>
366</body>
367</html>
368