title: JavaScript for display current year plus next year on June 1
body: <p>I would appreciate it if someone could help me with what I'm missing with the following JavaScript (I am converting a giant site from PHP to Javascript because the organization has switched to a new CMS). </p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  document.getElementById("year1").innerHTML = getYearOffset("0000-06-01", -1);
  // plus 1 year
  document.getElementById("year2").innerHTML = getYearOffset("0000-06-01", 1);
  &lt;/script&gt; 
  </code></pre>
  
  <p>Then in-line code:</p>
  
  <pre><code>&lt;span id="year1"&gt;&lt;/span&gt;-&lt;span id="year2"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>I want this to display current year - next year on and after June 1. </p>
  
  <p>The original functioning PHP was:</p>
  
  <pre><code>  &lt;?php if (date('m') &gt; 06) {
      echo date('Y');
      } else {
      echo date('Y')-1; }
      echo "-";
      if (date('m') &gt; 06) {
      echo date('y')+1;
      } else { 
      echo date('y'); }
       ?&gt; 
  </code></pre>
  
  <p>If anyone could help I would really appreciate it. I have been struggling with this bit of JavaScript, probably from exhaustion!</p>