JavaScript library
Days Old
How long have you had that job? How many days old are you? Find the answers to these questions and more!... detail
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/calculation/days-old.jpg[/IMG]
Demo: Days Old
How to setup
Step 1: Place HTML below in your BODY section
HTML
Code:
<SCRIPT LANGUAGE="JavaScript">
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
function countup(yr,m,d) {
var today=new Date();
var todayy=today.getYear();
if ((navigator.appName == "Microsoft Internet Explorer") && (todayy < 2000))
todayy="19" + todayy;
if (navigator.appName == "Netscape")
todayy=1900 + todayy;
var todaym=today.getMonth();
var todayd=today.getDate();
var todaystring=montharray[todaym]+" "+todayd+", "+todayy;
var paststring=montharray[m-1]+" "+d+", "+yr;
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1);
document.write("<b>JavaScriptBank. com was created " + difference + " days ago.</b>");
}
countup(2004,04,30); // Date in format: (year,month,day)
</script>
<!--
This script downloaded from w w w.JavaScriptBank. com
Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com
-->
Command to print web page in javascript -
Javascript Time Picker - JavaScript Go To URL Box
Quote:
|
Originally Posted by Copyright
The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such site or resource.
|