John Doe

If you want to make your dreams come true, the first thing you have to do is wake up.

Mary Taylor

You can have anything you want if you are willing to give up everything you have.

Age Calculator

Posted by

 

This free age calculator computes age in terms of years, months, weeks, days, hours, minutes, and seconds, given a date of birth

.base{
overflow: hidden;
display: flex;
flex-direction: column;
float: none;
}
.block{
padding: 5px 20px;
margin-left: 20px;
display: inline-block;
float: left;
}

input[type=text] {
margin: auto;
outline: none;
min-height: 20px;
border: 2px solid #1073d0;
padding: 12px;
border-radius: 7px;
font-size: 17px;
}
input[type=text]:focus{
background-color: #ffffff;
border: 2px solid orange;
outline: none;
}
input[type=button]{
width: 100px;
margin-left: 35%;
margin-top: 20px;
outline: none;
border: none;
border-radius: 6px;
background-color: crimson;
color: #ffffff;
padding: 10px 20px;
text-align: center;

font-size: 16px;
}
input[type=button]:hover{
background-color: #003669;
}

#age{
display: block;
margin: 10px;
margin-top: 35px;
padding: 10px;
padding-bottom: 20px;
overflow: hidden;
font-family: verdana;
font-size: 19px;
font-weight: normal;
line-height: 1.5;
word-spacing: 2.7px;

}

Age Calculator

Date

Month

Year

function age() {
var d1 = document.getElementById(‘date’).value;
var m1 = document.getElementById(‘month’).value;
var y1 = document.getElementById(‘year’).value;

var date = new Date();
var d2 = date.getDate();
var m2 = 1 + date.getMonth();
var y2 = date.getFullYear();
var month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];

if(d1 > d2){
d2 = d2 + month[m2 – 1];
m2 = m2 – 1;
}
if(m1 > m2){
m2 = m2 + 12;
y2 = y2 – 1;
}
var d = d2 – d1;
var m = m2 – m1;
var y = y2 – y1;

document.getElementById(‘age’).innerHTML = ‘Your Age is ‘+y+’ Years ‘+m+’ Months ‘+d+’ Days’;
}

1. Simple Age Calculator

2. Age Calculator – Easy & Fast

3. Your Age in Years, Months, and Days

4. Exact Age Calculator

5. Calculate Your Age Easily

6. Birthday Age Tracker

7. Years and Months Age Calculator

8. Age from Date of Birth

9. Online Age Calculator Tool

10. How Old Am I? – Age Calculator

These titles aim to functionality of an age calculator.

Leave a Reply

Your email address will not be published. Required fields are marked *