Download Pro Black Blogger Template

Download Pro Black Blogger Template

Yes, I too noticed every date is April 17. Though I was able to easily change the timestamp to use JavaScript to change the timestamp to retrieve the local date on the user’s computer, all that will do is display the current date, not the date of the actual post. Unfortunately, the only way to create a timestamp is to use a database and a server-side web language. So, although this was my favorite pick, I am going to have to get a new template. This is the code I created to make it display the current date:

var d=new Date();
var timestamp = new Array(2);
timestamp[1] = d.getDate();
timestamp[2] = d.getMonth();
document.write(timestamp[1]);
switch (timestamp[2])
{
case 0: document.write(“Jan”);
break;
case 1: document.write(“Feb”);
break;
case 2: document.write(“Mar”);
break;
case 3: document.write(“Apr”);
break;
case 4: document.write(“May”);
break;
case 5: document.write(“June”);
break;
case 6: document.write(“July”);
break;
case 7: document.write(“Aug”);
break;
case 8: document.write(“Sept”);
break;
case 9: document.write(“Oct”);
break;
case 10: document.write(“Nov”);
break;
case 11: document.write(“Dec”);
break;
}

↩ Reply

Download

Leave a Reply

Your email address will not be published. Required fields are marked *