title: Oracle SQL - Same day last year (leap year proof)
body: <p>I'm looking to find the same day last year in oracle sql. For example Wednesday, March 16, 2016 would be Wednesday, March 18, 2015 for last year.  So the closest day.</p>
  
  <p>The following code worked good until the current leap year and broke after Feb 29th 2016.</p>
  
  <p>this was my old statement which does not work for all dates:</p>
  
  <p>NEXT_DAY(TRUNC(ADD_MONTHS(date, -12), 'iw')-2, TO_CHAR(date, 'DY'))</p>