title: How to set cookie expiration date to a month?
body: <p>i just need to set this function to expire in one month, can someone tell me how to do it?</p>
  <pre><code>function _saveUserPreference() {
      // Set the cookie expiry to one year after today.
      var expiryDate = new Date();
      expiryDate.setFullYear(expiryDate.getFullYear() + 1);
      document.cookie = cookieName + '=y; expires=' + expiryDate.toGMTString();
  }
  </code></pre>