title: Add future date in Google script and Goggle Sheet
body: <p>I use <strong>Google sheet</strong> and Cryptofinance.ai to retreive cryptocurrency prices. I have one script that works well : it appends data periodically from one row in tab A to save them in a tab B so I can make graphs and charts.</p>
  <p>Now <strong>I'd like to add date + 1 year in the next row</strong>. Idealy, each time the script is triggered, it make two new rows : The one with the data as it is now and the one with the date + 1 year.</p>
  <p>If you curious and want to know why I want to do that is is to make projection price using this
  formula in another tab : <code>=TREND(filter(B2:B,B2:B&lt;&gt;&quot;&quot;),filter(A2:A,B2:B&lt;&gt;&quot;&quot;),filter(A2:A,(N(B2:B)=0)*(A2:A&gt;0)))</code></p>
  <p>Here is my script now:</p>
  <pre><code>    // [START modifiable parameters]
      var rangeToLog = 'Portefeuille!A28:L28';
      var sheetToLogTo = 'Archive BTC/USD KRAKEN';
      // [END modifiable parameters]
      ////////////////////////////////
      
      /**
      * Appends a range of values to the end of an archive sheet.
      * A timestamp is inserted in column A of each row on the archive sheet.
      * All values in rangeToLog go to one row on the archive sheet.
      *
      * @OnlyCurrentDoc
      */
      function appendValuesToArchiveBTCUSDKRAKENSheet() {
        // version 1.4, written by --Hyde, 30 January 2020
        //  - use Array.prototype.some() to skip empty rows when concating
        //  - see https://support.google.com/docs/thread/27095918?msgid=27148911
        // version 1.3, written by --Hyde, 26 January 2020
        //  - see https://support.google.com/docs/thread/26760916
        var ss = SpreadsheetApp.getActive();
        var valuesToLog = ss.getRange(rangeToLog).getValues();
        var logSheet = ss.getSheetByName(sheetToLogTo);
        if (!logSheet) {
          logSheet = ss.insertSheet(sheetToLogTo);
          logSheet.appendRow(['Date time', 'Data']);
        }
        var rowToAppend = [new Date()].concat(
          valuesToLog.reduce(function concatArrays_(left, right) {
            var arrayContainsData = right.some(function isNonBlanky_(element, index, array) {
              return element !== null &amp;&amp; element !== undefined &amp;&amp; element !== '';
            });
            return arrayContainsData ? left.concat(right) : left;
          })
        );
        logSheet.appendRow(rowToAppend);
      }
  </code></pre>
  <p><strong>NOW :</strong></p>
  <p><a href="https://i.stack.imgur.com/CXtkN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CXtkN.png" alt="Each time the script is triggered, it adds a new line." /></a></p>
  <p><strong>What I want to do:</strong></p>
  <p><a href="https://i.stack.imgur.com/grFPx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/grFPx.png" alt="Same but it also appends a date in the future" /></a></p>