title: Pig - How to manipulate and compare dates?
body: <p>I have a file which contains entries like this:</p>
  
  <pre><code>1,1,07 2012,07 2013,11,blablabla
  </code></pre>
  
  <p>The two first fields are ids. The third is the begin date(month year) and the fourth is the end date. The fifth field is the number of months btweens these two dates. And the last field contains text.</p>
  
  <p>Here is my pig code to load this data:</p>
  
  <pre><code>f = LOAD 'file.txt' USING PigStorage(',') AS (id1:int, id2:int, date1:chararray, date2:chararray, duration:int, text:chararray);
  </code></pre>
  
  <p>I would like to filter my file so that I keep only the entries where date2 is less than three years from today. Is it possible to that in Pig ?</p>
  
  <p>Thanks.</p>