|
Bangladeshi Softwares
|
| Home - Download - Codes & Tutorials - Bangla IT Bibhag - Mobile - About Me |
Custom function for modified page in JavaScript
Step-1:
This is a customized version of JavaScript's document.lastModified property. Please note that not all web servers are required to provide the timestamp. If your web server is not going to provide this information for you, calling this function may display incorrect timestamp. Open your favorite text editor and type the code below:
<script language="javascript" type="text/javascript">
<!--
/*
* Author: Ahsanul Haque Shovon
* Email: ahsanul.haque.shovon@gmail.com / ahsanul_haque_shovon@yahoo.com
* Web: http://shovon.110mb.com
*/
/*************************************************
* This function will serve you the full date and
* time when document was last saved.
*************************************************/
function full_modify_date()
{
var day = new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
var mon = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul',
'Aug','Sep','Oct','Nov','Dec');
date = new Date(document.lastModified);
temp = date.getDay();
dt = day[temp];
dt += ', ' + date.getDate();
temp = date.getMonth();
dt += ' ' + mon[temp];
dt += ' ' + date.getFullYear();
dt += ', ' + date.getHours();
dt += ':' + date.getMinutes();
dt += ':' + date.getSeconds();
document.write(dt);
}
//-->
</script>
|
©Ahsanul Haque Shovon
All rights reserved
|