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_25) on Mon Jun 02 17:48:58 PDT 2014 --> 6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> 7<title>ISO8601Utils (jackson-databind 2.4.0 API)</title> 8<meta name="date" content="2014-06-02"> 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.4.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: </li> 65<li>Nested | </li> 66<li>Field | </li> 67<li><a href="#constructor_summary">Constr</a> | </li> 68<li><a href="#method_summary">Method</a></li> 69</ul> 70<ul class="subNavList"> 71<li>Detail: </li> 72<li>Field | </li> 73<li><a href="#constructor_detail">Constr</a> | </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/6/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/6/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 103 using SimpleDateFormat so highly suitable if you (un)serialize lots of date objects.</div> 104</li> 105</ul> 106</div> 107<div class="summary"> 108<ul class="blockList"> 109<li class="blockList"> 110<!-- ======== CONSTRUCTOR SUMMARY ======== --> 111<ul class="blockList"> 112<li class="blockList"><a name="constructor_summary"> 113<!-- --> 114</a> 115<h3>Constructor Summary</h3> 116<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> 117<caption><span>Constructors</span><span class="tabEnd"> </span></caption> 118<tr> 119<th class="colOne" scope="col">Constructor and Description</th> 120</tr> 121<tr class="altColor"> 122<td class="colOne"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#ISO8601Utils()">ISO8601Utils</a></strong>()</code> </td> 123</tr> 124</table> 125</li> 126</ul> 127<!-- ========== METHOD SUMMARY =========== --> 128<ul class="blockList"> 129<li class="blockList"><a name="method_summary"> 130<!-- --> 131</a> 132<h3>Method Summary</h3> 133<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 134<caption><span>Methods</span><span class="tabEnd"> </span></caption> 135<tr> 136<th class="colFirst" scope="col">Modifier and Type</th> 137<th class="colLast" scope="col">Method and Description</th> 138</tr> 139<tr class="altColor"> 140<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 141<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/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a> date)</code> 142<div class="block">Format a date into 'yyyy-MM-ddThh:mm:ssZ' (GMT timezone, no milliseconds precision)</div> 143</td> 144</tr> 145<tr class="rowColor"> 146<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 147<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#format(java.util.Date, boolean)">format</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a> date, 148 boolean millis)</code> 149<div class="block">Format a date into 'yyyy-MM-ddThh:mm:ss[.sss]Z' (GMT timezone)</div> 150</td> 151</tr> 152<tr class="altColor"> 153<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 154<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#format(java.util.Date, boolean, java.util.TimeZone)">format</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a> date, 155 boolean millis, 156 <a href="http://docs.oracle.com/javase/6/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a> tz)</code> 157<div class="block">Format date into yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]</div> 158</td> 159</tr> 160<tr class="rowColor"> 161<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a></code></td> 162<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#parse(java.lang.String)">parse</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> date)</code> 163<div class="block">Parse a date from ISO-8601 formatted string.</div> 164</td> 165</tr> 166<tr class="altColor"> 167<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a></code></td> 168<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/util/ISO8601Utils.html#timeZoneGMT()">timeZoneGMT</a></strong>()</code> 169<div class="block">Accessor for static GMT timezone instance.</div> 170</td> 171</tr> 172</table> 173<ul class="blockList"> 174<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 175<!-- --> 176</a> 177<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> 178<code><a href="http://docs.oracle.com/javase/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> 179</ul> 180</li> 181</ul> 182</li> 183</ul> 184</div> 185<div class="details"> 186<ul class="blockList"> 187<li class="blockList"> 188<!-- ========= CONSTRUCTOR DETAIL ======== --> 189<ul class="blockList"> 190<li class="blockList"><a name="constructor_detail"> 191<!-- --> 192</a> 193<h3>Constructor Detail</h3> 194<a name="ISO8601Utils()"> 195<!-- --> 196</a> 197<ul class="blockListLast"> 198<li class="blockList"> 199<h4>ISO8601Utils</h4> 200<pre>public ISO8601Utils()</pre> 201</li> 202</ul> 203</li> 204</ul> 205<!-- ============ METHOD DETAIL ========== --> 206<ul class="blockList"> 207<li class="blockList"><a name="method_detail"> 208<!-- --> 209</a> 210<h3>Method Detail</h3> 211<a name="timeZoneGMT()"> 212<!-- --> 213</a> 214<ul class="blockList"> 215<li class="blockList"> 216<h4>timeZoneGMT</h4> 217<pre>public static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a> timeZoneGMT()</pre> 218<div class="block">Accessor for static GMT timezone instance.</div> 219</li> 220</ul> 221<a name="format(java.util.Date)"> 222<!-- --> 223</a> 224<ul class="blockList"> 225<li class="blockList"> 226<h4>format</h4> 227<pre>public static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> format(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a> date)</pre> 228<div class="block">Format a date into 'yyyy-MM-ddThh:mm:ssZ' (GMT timezone, no milliseconds precision)</div> 229<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - the date to format</dd> 230<dt><span class="strong">Returns:</span></dt><dd>the date formatted as 'yyyy-MM-ddThh:mm:ssZ'</dd></dl> 231</li> 232</ul> 233<a name="format(java.util.Date, boolean)"> 234<!-- --> 235</a> 236<ul class="blockList"> 237<li class="blockList"> 238<h4>format</h4> 239<pre>public static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> format(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a> date, 240 boolean millis)</pre> 241<div class="block">Format a date into 'yyyy-MM-ddThh:mm:ss[.sss]Z' (GMT timezone)</div> 242<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> 243<dt><span class="strong">Returns:</span></dt><dd>the date formatted as 'yyyy-MM-ddThh:mm:ss[.sss]Z'</dd></dl> 244</li> 245</ul> 246<a name="format(java.util.Date, boolean, java.util.TimeZone)"> 247<!-- --> 248</a> 249<ul class="blockList"> 250<li class="blockList"> 251<h4>format</h4> 252<pre>public static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> format(<a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a> date, 253 boolean millis, 254 <a href="http://docs.oracle.com/javase/6/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a> tz)</pre> 255<div class="block">Format date into yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]</div> 256<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 (GMT will produce 'Z')</dd> 257<dt><span class="strong">Returns:</span></dt><dd>the date formatted as yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]</dd></dl> 258</li> 259</ul> 260<a name="parse(java.lang.String)"> 261<!-- --> 262</a> 263<ul class="blockListLast"> 264<li class="blockList"> 265<h4>parse</h4> 266<pre>public static <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a> parse(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> date)</pre> 267<div class="block">Parse a date from ISO-8601 formatted string. It expects a format yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]</div> 268<dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - ISO string to parse in the appropriate format.</dd> 269<dt><span class="strong">Returns:</span></dt><dd>the parsed date</dd> 270<dt><span class="strong">Throws:</span></dt> 271<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the date is not in the appropriate format</dd></dl> 272</li> 273</ul> 274</li> 275</ul> 276</li> 277</ul> 278</div> 279</div> 280<!-- ========= END OF CLASS DATA ========= --> 281<!-- ======= START OF BOTTOM NAVBAR ====== --> 282<div class="bottomNav"><a name="navbar_bottom"> 283<!-- --> 284</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 285<!-- --> 286</a> 287<ul class="navList" title="Navigation"> 288<li><a href="../../../../../overview-summary.html">Overview</a></li> 289<li><a href="package-summary.html">Package</a></li> 290<li class="navBarCell1Rev">Class</li> 291<li><a href="class-use/ISO8601Utils.html">Use</a></li> 292<li><a href="package-tree.html">Tree</a></li> 293<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> 294<li><a href="../../../../../index-all.html">Index</a></li> 295<li><a href="../../../../../help-doc.html">Help</a></li> 296</ul> 297</div> 298<div class="subNav"> 299<ul class="navList"> 300<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> 301<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> 302</ul> 303<ul class="navList"> 304<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/util/ISO8601Utils.html" target="_top">Frames</a></li> 305<li><a href="ISO8601Utils.html" target="_top">No Frames</a></li> 306</ul> 307<ul class="navList" id="allclasses_navbar_bottom"> 308<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> 309</ul> 310<div> 311<script type="text/javascript"><!-- 312 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 313 if(window==top) { 314 allClassesLink.style.display = "block"; 315 } 316 else { 317 allClassesLink.style.display = "none"; 318 } 319 //--> 320</script> 321</div> 322<div> 323<ul class="subNavList"> 324<li>Summary: </li> 325<li>Nested | </li> 326<li>Field | </li> 327<li><a href="#constructor_summary">Constr</a> | </li> 328<li><a href="#method_summary">Method</a></li> 329</ul> 330<ul class="subNavList"> 331<li>Detail: </li> 332<li>Field | </li> 333<li><a href="#constructor_detail">Constr</a> | </li> 334<li><a href="#method_detail">Method</a></li> 335</ul> 336</div> 337<a name="skip-navbar_bottom"> 338<!-- --> 339</a></div> 340<!-- ======== END OF BOTTOM NAVBAR ======= --> 341<p class="legalCopy"><small>Copyright © 2014 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p> 342</body> 343</html> 344