title: ISO 8601 Time Interval Parsing in Java
body: <p><a href="http://en.wikipedia.org/wiki/ISO_8601#Time_intervals">ISO 8601</a> defines a syntax for representing a time interval. </p>
  
  <p>There are four ways to express a time interval:</p>
  
  <ul>
  <li>Start and end, such as "2007-03-01T13:00:00Z/2008-05-11T15:30:00Z"</li>
  <li>Start and duration, such as "2007-03-01T13:00:00Z/P1Y2M10DT2H30M"</li>
  <li>Duration and end, such as "P1Y2M10DT2H30M/2008-05-11T15:30:00Z"</li>
  <li>Duration only, such as "P1Y2M10DT2H30M", with additional context information</li>
  </ul>
  
  <p>If any elements are missing from the end value, they are assumed to be the same as for the start value including the time zone. This feature of the standard allows for concise representations of time intervals. For example, the date of a two-hour meeting including the start and finish times could be simply shown as "2007-12-14T13:30/15:30", where "/15:30" implies "/2007-12-14T15:30" (the same date as the start), or the beginning and end dates of a monthly billing period as "2008-02-15/03-14", where "/03-14" implies "/2008-03-14" (the same year as the start).</p>
  
  <p>In addition, repeating intervals are formed by adding "R[n]/" to the beginning of an interval expression, where R is used as the letter itself and [n] is replaced by the number of repetitions. Leaving out the value for [n] means an unbounded number of repetitions. So, to repeat the interval of "P1Y2M10DT2H30M" five times starting at "2008-03-01T13:00:00Z", use "R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M".</p>
  
  <p>I am looking for a good Java parser (if possible compatible with the Joda-Time library) to parse this syntax. Any pointers to a good library ?</p>