Visualizar la antigüedad de una página Web
¿Son sus páginas nuevas? Permita a todos saberlo, visualizando
su antigüedad.
Inserte este script donde quiera para visualizar la antigüedad de la página:
<SCRIPT LANGUAGE="Javascript">
function CalculDateDiffModif () {
var today = new Date();
var compYear = (today.getYear()>99 && today.getYear()<1970) ? today.getYear()+1900 :
today.getYear();
var d1 = Date.UTC (compYear,today.getMonth(),today.getDate(),0,0,0);
var today = new Date(document.lastModified);
compYear = (today.getYear()<70) ? today.getYear()+2000 : today.getYear();
if (compYear>99 && compYear<1970) compYear+=1900;
var d2 = Date.UTC (compYear,today.getMonth(),today.getDate(),0,0,0);
return (Math.ceil(Math.abs((d1-d2)/(24*3600000))));
}
document.write (CalculDateDiffModif ());
// -->
</SCRIPT>