title: google sheets Hide rows based on today's date
body: <p>Within Google Sheets I need a script to hide rows automatically in sheet 1 when the date in column A is equal to or before today's date.</p>
  
  <p>so if today is August 29, 2018 and the date in cell A3 is August 28, 2018  all of Row 3 will be hidden</p>
  
  <p>But if the date was August 30, 2018 in cell A3 then all of Row 3 would b visible until the current date is August 31, 2018.</p>
  
  <p>thank you for any help you can provide.</p>
  
  <p>I have been working with this code which I found which hides rows, not in the current month I can't seem to Figure out how to modify it to look at the current day and hide rows which are older than the current date.</p>
  
  <pre><code>  function onOpen() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var menuItems=[{name: 'HideRows', functionName: 'hideRows'}];
    ss.addMenu('Script', menuItems);    
    };
  
   function hideRows() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var s = ss.getSheetByName("Sheet1");
    var v = s.getRange("A:A").getValues();
    var today = new Date();
    var m = today.getMonth();
    for(var i=3;i&lt;v.length;i++)
      if(v[i][0]=="" || v[i][0].getMonth()&gt;=m) break;
    if(i&gt;3) s.hideRows(4,i-3)
    };
  </code></pre>