I've come across a snippet of code that I'm trying to decipher. It's used to set a cookie with an expiry date, and it looks something like this.
var date = new Date();
date.setTime(date.getTime() + 1000*60*60*24*365);
var expires = "; expires=" + date.toGMTString();
My goal is to understand what each number in the code represents. While I know that it involves adding milliseconds to the time object, breaking down the significance of each numeric value is where I'm currently stuck.