123 Kamble Aditya CSS
123 Kamble Aditya CSS
PROJECT REPORT ON
“AGE CALCULATOR”
Subject – Client Side Scripting Language (22517)
SUBMITTED BY
Kamble Aditya Balasaheb (200340414)
Submitted to
Affiliated to
CERTIFICATE
This is to certify that Mr Kamble Aditya Balasaheb , a student of Department of
Computer Technology having Enrollment No.:2000340414 has completed the micro
project satisfactorily in the subject Client Side Scripting language (CSS) (22517) for the
Academic
Year: 2022-23 & Sem: Fifth(ODD) as prescribed in the curriculum on
“AGE CALCULATOR”
Place: Date:
Seal of
Institute
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI
EXAMINERS CERTIFICATE
“AGE CALCULATOR”
Submitted by Kamble
Aditya Balasaheb (2000340414)
Date:
Place: Kopargaon
INTRODUCTION
Age calculator android project as the name indicate is used to calculate any persons
present age and make analysis for future reference. To start using this android project,
you need to fill the information of persons as contact list and get required information in just one click.
Even not this, using the edit option you can makes changes to the saved data and if such data is not
required, you may delete such contacts.
To make your work more identical, you can add images to particular person’s profile, so that it can
easily be recognized.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Age Calculator</title>
</head>
<div></div>
<body>
<div class="container">
<div class="inputs-wrapper">
<button onclick="ageCalculate()">Calculate</button>
</div>
<div class="outputs-wrapper">
<div>
<span id="years">
</span>
<p>
Years
</p>
</div>
<div>
<span id="months">
</span>
<p>
Months
</p>
</div>
<div>
<span id="days">
</span>
<p>
Days
</p>
</div>
</div>
</div>
<footer>
<p>
</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"
integrity="sha512-
qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="precise-range.min.js"></script>
<script src="script.js"></script>
</body>
</html>
*{
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: 'sans';
@font-face {
font-family: 'sans';
src: url(font/sans.ttf);
body {
background-color: #19172e;
.container{
width: 40%;
min-width: 300px;
position: absolute;
transform: translate(-50%,-50%);
left: 50%;
top: 50%;
.container *{
font-family: "Poppins",sans-serif;
border: none;
outline: none;
.inputs-wrapper{
background-color: #080808;
border-radius: 8px;
margin-bottom: 50px;
input,
button{
height: 50px;
background-color: #ffffff;
color: #080808;
font-weight: 500;
border-radius: 5px;
input{
width: 60%;
padding: 0 20px;
font-size: 14px;
button{
width: 30%;
float: right;
.outputs-wrapper{
width: 100%;
display: flex;
justify-content: space-between;
.outputs-wrapper div{
height: 100px;
width: 100px;
background-color: #080808;
border-radius: 5px;
color: #ffffff;
display: grid;
place-items: center;
padding: 20px 0;
span{
font-size: 30px;
font-weight: 500;
p{
font-size: 14px;
color: #707070;
font-weight: 400;
footer {
color: white;
position: fixed;
text-align: center;
font-size: 1rem;
left: 0;
right: 0;
bottom: 0;
padding: 5px;
line-height: 3vh;
footer a:visited {
color: inherit;
.container {
width: 80%;
.container #display {
font-size: 20px;
color: #fff;
padding-bottom: 61px;
.container code {
font-size: 0.875em;
color: #d63384;
word-wrap: break-word;
}
.hedi{
justify-content: center;
font-size: 50px;
text-align: center;
color: #fff;
padding-top: 20px;
.foot{
position: fixed;
JAVASCRIPT:
selectedMonth = today.getMonth() + 1,
selectedDay = today.getDate(),
daysOfMonths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
window.addEventListener('DOMContentLoaded', () => {
updateDaysOfMonths(today.getFullYear());
fillYearField();
selectMonth(today.getMonth() + 1);
selectDay(today.getDate());
yearField.addEventListener('change', handleYearChange);
monthField.addEventListener('change', handleMonthChange);
dayField.addEventListener('change', handleDayChange);
calculateButton.addEventListener('click', handleAgeCalculation);
});
/**
*/
function isLeapYear(year) {
return false;
/**
*/
function updateDaysOfMonths(year) {
/**
*/
function selectMonth(month) {
monthField.value = month;
/**
*/
function selectDay(day) {
dayField.value = day;
/**
*/
function fillYearField() {
option.value = i;
option.textContent = i;
yearField.appendChild(option);
/**
* This is needed to update the day field list with the change
* It is needed to change with year as the days change with leap year as well.
*/
updateDaysOfMonths(year);
clearList(dayField);
option.textContent = i;
dayField.appendChild(option);
/**
*/
function clearList(element) {
element.remove(i);
/**
* @returns {Date}
*/
function makeDate() {
/**
*/
function handleYearChange(event) {
event.preventDefault();
selectedYear = +value;
updateDayField(value, selectedMonth);
function ageCalculate(){
let birthMonth,birthDate,birthYear;
let birthDetails = {
date:inputDate.getDate(),
month:inputDate.getMonth()+1,
year:inputDate.getFullYear()
leapChecker(currentYear);
if(
){
displayResult("-","-","-");
return;
else{
birthYear--;
else{
birthMonth--;
birthMonth = 11;
birthYear--;
}
displayResult(birthDate,birthMonth,birthYear);
function displayResult(bDate,bMonth,bYear){
document.getElementById("years").textContent = bYear;
document.getElementById("months").textContent = bMonth;
document.getElementById("days").textContent = bDate;
function leapChecker(year){
months[1] = 29;
else{
months[1] = 28;
(function (moment) {
var STRINGS = {
nodiff: '',
year: 'year',
years: 'years',
month: 'month',
months: 'months',
day: 'day',
days: 'days',
hour: 'hour',
hours: 'hours',
minute: 'minute',
minutes: 'minutes',
second: 'second',
seconds: 'seconds',
};
if (yDiff) {
result.push(pluralize(yDiff, 'year'));
if (mDiff) {
result.push(pluralize(mDiff, 'month'));
if (dDiff) {
result.push(pluralize(dDiff, 'day'));
if (hourDiff) {
result.push(pluralize(hourDiff, 'hour'));
if (minDiff) {
result.push(pluralize(minDiff, 'minute'));
}
if (secDiff) {
result.push(pluralize(secDiff, 'second'));
return result.join(STRINGS.delimiter);
return {
years: yDiff,
months: mDiff,
days: dDiff,
hours: hourDiff,
minutes: minDiff,
seconds: secDiff,
firstDateWasLater: firstDateWasLater,
};
};
var m1 = moment(d1),
m2 = moment(d2),
firstDateWasLater;
if (returnValueObject) {
} else {
return STRINGS.nodiff;
if (m1.isAfter(m2)) {
m1 = m2;
m2 = tmp;
firstDateWasLater = true;
} else {
firstDateWasLater = false;
if (secDiff < 0) {
secDiff = 60 + secDiff;
minDiff--;
if (minDiff < 0) {
minDiff = 60 + minDiff;
hourDiff--;
}
if (hourDiff < 0) {
hourDiff = 24 + hourDiff;
dDiff--;
if (dDiff < 0) {
.subtract(1, 'M')
.daysInMonth();
} else {
mDiff--;
if (mDiff < 0) {
mDiff = 12 + mDiff;
yDiff--;
if (returnValueObject) {
} else {
};
})(moment);
CONCLUSION
At the end, exact human age is required to be calculated in many sectors for various purposes.
With the development of technology, use of software is preferred to manual hand calculation of age.
Android app development project, it seems to have bright future and scope in all Android devices.
It was a great experience to design and implement the Swing using Advanced
Java programming and also to work on its documentation. This project helped me in getting
the better understanding of Swings and AWT Components of Advanced Java Programming.
After doing this project, I am in position to explain concepts of Advanced Java Programming
and apply them to the modelling of real-world systems by utilizing its offered facilities. I am
now able to handle events of AWT and swing components and also develop programs using
networking concepts.