Exforsys

Online Training

Birthday Script

This is a discussion on Birthday Script within the Java forums, part of the Programming Talk category; Code: <script language="JavaScript"> var arrBday = [ ['Bob','11/23/1973'], ['Peter','9/22/1977'], ['John','9/...


Go Back   Exforsys > Programming Talk > Java

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-11-2006, 12:57 PM
Member
 
Join Date: Apr 2006
Posts: 30
insane is on a distinguished road
Birthday Script

Code:
<script language="JavaScript">

var arrBday = [
['Bob','11/23/1973'],
['Peter','9/22/1977'],
['John','9/22/1999']
];

function displayBdayList(today){
  var bday,strList='';
  for (var i=0;i<arrBday.length;i++){
    bday = new Date(arrBday[i][1]);
    if (!isNaN(bday) && bday.getMonth()==today.getMonth() && bday.getDate()==today.getDate()) 
strList+='- '+arrBday[i][0]+" ("+(today.getFullYear()-bday.getFullYear())+")<br>";
  }
  if (strList=='') strList='- NONE'
  document.write("<h4>Today's Birtdays:</h4>"+strList)
}

displayBdayList(new Date());
</script>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Free iPod Script Duality PHP 4 12-07-2006 02:29 AM
Perl Script Scheduling On Unix Webserver encoder Perl 0 04-26-2006 11:34 PM
Python script problem Zarooka Python 1 04-20-2006 07:46 PM
Who wrote "Happy Birthday to You"? JobHelper Chit-Chat 0 02-24-2006 02:30 AM
Position C/C++,HP-UX, Shell Script kalareddy Experienced Job Seekers - India 0 06-07-2005 09:46 AM


All times are GMT -4. The time now is 07:00 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.