title: I want my Javascript to expire in 30 days
body: <p>I'm looking for some code which can check whether 30 days have passed, and if so the script will stop working; if not, it calls the <code>start()</code> function.</p>
  
  <p>I only need to do it in Javascript.</p>
  
  <pre><code>var date = 11;
  var month = 10;
  var year = 2012;
  
  function Checkday() {
      if ( // check 30 days ) {
          start();
      } else {
          stop();
      };
  };
  </code></pre>
  
  <p>I'm also wondering whether there is a way to add PHP code in a JS file. I know this is a stupid question but I'm just curious.</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Edited:</strong> </p>
  
  <p>We will be selling the JS file so we will be setting the date in the JS file. So we want it to check the expiry time and stop functioning.</p>