Конвертор $LASTMOD$ посредством Javascript:
Пример 1:
Код
<time itemprop="lastReviewed" datetime="$LASTMOD$"></time>
<script>
/*<![CDATA[*/
var yearX, monthX, dayX = 0;
a = $LASTMOD$;
b = parseInt(a/86400);
c = b-730;
d = parseInt(c/1461);
yearX = 1972+(d*4);
e = c-(d*1461);
if(e>366){e=e-366; yearX=yearX+1};
if(e>365){while (e>365){e=e-365; yearX=yearX+1}};
k=e;
monthX=1;
if(yearX%4==0){l=60}else{l=59};
if(k>l){monthX=monthX+2; k=k-l}else{if(k>31){k=k-31; monthX=monthX+1};};
if(k>61){while(k>61){k=k-61; monthX=monthX+2}};
if(k>31){k=k-31; monthX=monthX+1};
dayX=k+1;
if(dayX<10){dayX='0' + dayX};
if(monthX<10){monthX='0' + monthX};
document.getElementById('dateModified').innerHTML = document.write(dayX + '.' + monthX + '.' + yearX);
/*]]>*/
</script>
Вариант 2 Дата:
Код
<script type="text/javascript">
var yearX, monthX, dayX = 0;
a = $LASTMOD$;
b = parseInt(a/86400);
c = b-730;
d = parseInt(c/1461);
yearX = 1972+(d*4);
e = c-(d*1461);
if(e>366){e=e-366; yearX=yearX+1};
if(e>365){while (e>365){e=e-365; yearX=yearX+1}};
k=e;
monthX=1;
if(yearX%4==0){l=60}else{l=59};
if(k>l){monthX=monthX+2; k=k-l}else{if(k>31){k=k-31; monthX=monthX+1};};
if(k>61){while(k>61){k=k-61; monthX=monthX+2}};
if(k>31){k=k-31; monthX=monthX+1};
dayX=k+1;
if(dayX<10){dayX='0' + dayX};
if(monthX<10){monthX='0' + monthX};
document.write(dayX + '.' + monthX + '.' + yearX);
</script>
Вариант 3 Время:
Код
<script type="text/javascript">
var hourX, minX, secX = 0;
a = $LASTMOD$;
b = parseInt(a/86400);
z = a-(b*86400)
y = parseInt(z/60);
secX = z-(y*60);
if(secX<10){secX='0' + secX};
hourX = parseInt(y/60);
minX = y-(hourX*60);
if(minX<10){minX='0' + minX};
if(hourX<10){hourX='0' + hourX};
document.write(hourX + ':' + minX + ':' + secX);
</script>
Вариант 4 Дата и время:
Код
<script type="text/javascript">
var yearX, monthX, dayX, hourX, minX, secX = 0;
a = $LASTMOD$;
b = parseInt(a/86400);
c = b-730;
d = parseInt(c/1461);
yearX = 1972+(d*4);
e = c-(d*1461);
if(e>366){e=e-366; yearX=yearX+1};
if(e>365){while (e>365){e=e-365; yearX=yearX+1}};
k=e;
monthX=1;
if(yearX%4==0){l=60}else{l=59};
if(k>l){monthX=monthX+2; k=k-l}else{if(k>31){k=k-31; monthX=monthX+1};};
if(k>61){while(k>61){k=k-61; monthX=monthX+2}};
if(k>31){k=k-31; monthX=monthX+1};
dayX=k+1;
z = a-(b*86400)
y = parseInt(z/60);
secX = z-(y*60);
hourX = parseInt(y/60);
minX = y-(hourX*60);
if(monthX<10){monthX='0' + monthX};
if(dayX<10){dayX='0' + dayX};
if(hourX<10){hourX='0' + hourX};
if(minX<10){minX='0' + minX};
if(secX<10){secX='0' + secX};
document.write(dayX + '.' + monthX + '.' + yearX + ', в ' + hourX + ':' + minX + ':' + secX);
</script>