Tagged: calculate age from date of birth in typescript

Age Date of Birth calculation with Counter in javascript 0

Age Date of Birth calculation with Counter in javascript

Age Date of Birth calculation with Counter in javascript

In this Post We Will Explain About is Age Date of Birth calculation with Counter in javascript With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Date of Birth Counter Using Javascript Example

In this post we will show you Best way to implement Javascript calculate Age from Birthdate, hear for javascript function to calculate age from date of birth entered in a textbox with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

index.html

Creating simple HTML source code

<FORM name="mybirth_date">
<BR><BR><BR>
<TABLE border=1>
<tr>
	<td><input type="button" name="start" value="Start" ONCLICK="birthdatTimer(this.form)"></td>
	<td><input type="reset" name="btnreset" value="Reset Age"></td>
</tr>
<tr>
	<td>Date of birth:</td>
	<td><input type="text" name="age" value="" SIZE=20 placeholder="January 25, 1992"> </td>
</tr>
<tr><td>You are days old:</td>
<td>
<input type="text" name="firsttime" value="" size=8>
</td>
</tr>
<tr><td>Plus hours old:</td>
<td>
<input type="text" name="secondtime" value="" size=8>
</td>
</tr>
<tr><td>Plus minutes old:</td>
<td><input type="text" name="thirdtime" value="" size=8></td>
</tr>
</TABLE>
</FORM>

index.js

<script language="javascript">
<!-- here simple hide this javascript tag's html contents from old ay browsers
function birthdatTimer(){            
 
        today = new Date()          
        BirthDay = new Date(document.mybirth_date.age.value)         
        old_time = (today.getTime() - BirthDay.getTime());         
        sectimeold = old_time / 1000;         
        secondsold = Math.floor(sectimeold);         
        perDayms = 24 * 60 * 60 * 1000 ;         
        old_time = (today.getTime() - BirthDay.getTime());         
        e_daysold = old_time / perDayms;         
        totaldaysl = Math.floor(e_daysold);         
        e_hrsold = (e_daysold - totaldaysl)*24;         
        totalhrssl = Math.floor(e_hrsold);         
        totalminsl = Math.floor((e_hrsold - totalhrssl)*60);           
 
        document.mybirth_date.firsttime.value = totaldaysl              
 
        document.mybirth_date.secondtime.value = totalhrssl               
 
        document.mybirth_date.thirdtime.value = totalminsl              
 
        window.status = "Good Luck at the golden moment you are " + secondsold + "............ seconds old.";         
        timerID = setTimeout("birthdatTimer()",1000)   
 
}        
// --Pakainfo.com done hiding from old browsers -->
 
</script>

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is age calculation in javascript using date of birth And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.