Advance Online Age Calculator Script For Blogger

 Advance Online Age Calculator Script For Blogger

Advance Online Age Calculator Script For Blogger



Hey, guys welcome to the blogs of S . B Tech, So these days we tend to ar back with a surprising script in blogger which is Advance Online Age Calculator Script For Blogger.

So here during this Blogger Website, we are going to find out how to set up an internet site that is Advance Online Age Calculator Script For Blogger. when finishing web site setup it's necessary to try to to the SEO setting, as SEO can assist your website to rank.

So below are the steps for setup a website in blogger, follow them and begin Earning from your tool website.



Do the subsequent Steps for creating web site In Blogger For Advance Online Age Calculator Script For Blogger




Step 1: Login To Blogger Account Through Gmail.


Step 2: produce web blog Name.


Step 3: opt for Your Preferred Domain name. And Save it.


Step 4: 1st of all visit your Blogger Dashboard.


Step 5: visit Themes, then scroll down and choose straightforward Theme guide ( Edit/ Arrow ),


Step 6:  Then click on the down arrow choose|and choose} Mobile Setting then click on Desktop and click on Save.


Step 7: when then select Switch To 1st Generation Classic Theme, and so choose Switch while not Backup.


Step 8: And so once more click on down arrow choose|and choose} modification Navbar choice and once more a change posture arrow can return then select choice Off click on Save.


Step 9: Then Click on Edit Html and choose the complete code and delete it, after deleting the whole code, Copy the below code and so click on Save.



<html>
<head>
    <title>Exact Age Calculator</title>
	<style>
    #main_container {
    width: 400px;
    margin: 20px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    font-family: sans-serif;
    border-radius: 20px;
    border: 3px solid #999;
}

#birth_date_input, #age_container {
    text-align: center;
    margin: 20px;
    margin-left: auto;
    margin-right: auto;
}

#age_container {
    margin: 40px 5px;
    padding: 20px;
    border-radius: 50px;
    border: 1px solid #000;
    font-weight: bolder;
    background: #EEE;
    font-size: 20px;
    line-height: 40px;
}

#calculate {
    cursor: pointer;
    text-align: center;
    width: 200px;
    padding: 5px;
    margin: 10px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #999;
    border-radius: 10px;
    background: #FFD119;
    background: -webkit-gradient(linear, left top, left bottom, from(#FFD119), to(#E6B800));
	background: -moz-linear-gradient(top, #FFD119, #E6B800);
    font-weight: bold;
    height: 28px;
    box-shadow: 0 -8px inset;
}

#calculate:hover {
    background: -webkit-gradient(linear, left top, left bottom, from(#E6B800), to(#FFD119));
	background: -moz-linear-gradient(top, #E6B800, #FFD119);
    margin-top: 13px;
    height: 25px;
    box-shadow: 0 -5px inset;
}

#calculate:active {
    background: #403300;
    padding-top: 10px;
    height: 20px;
    box-shadow: 0 5px #000 inset;
}

#age {
    padding: 5px;
    border: 3px dashed #254117;
    background-color: yellow;
}
html{
    background:rgb(100, 100, 1000);
}
    </style>

</head>
<body>
    <div id="main_container">
        <div id="birth_date_input">Birth Date*: <input type="date" id="birth_date"></div>
        <br/>
        <div id="calculate">Calculate your age**</div><br>
        <center>Adsense Code</center>
        
        <div id="age_container"><span id="exact_age">Age</span></div>
        <p>* The year here is 365/366 days and the month here is 28/29/30/31 days, that means your birthday may not mean you will be 0 days old.</p>
        <p>**Don't worry I will not share your input.</p>
        
        <p>Article 1</p>
        <center>Adsense Code</center>
        <p> Article 2</p>
    </div>
	<script src="https://code.jquery.com/jquery-latest.min.js"></script>
 <script>
     $(document).ready(function(){
    $("#calculate").click(function(){
        var mdate = $("#birth_date").val().toString();
        var yearThen = parseInt(mdate.substring(0,4), 10);
        var monthThen = parseInt(mdate.substring(5,7), 10);
        var dayThen = parseInt(mdate.substring(8,10), 10);
        
        var today = new Date();
        var birthday = new Date(yearThen, monthThen-1, dayThen);
        
        var differenceInMilisecond = today.valueOf() - birthday.valueOf();
        
        var year_age = Math.floor(differenceInMilisecond / 31536000000);
        var day_age = Math.floor((differenceInMilisecond % 31536000000) / 86400000);
        
        if ((today.getMonth() == birthday.getMonth()) && (today.getDate() == birthday.getDate())) {
            alert("Happy B'day!!!");
        }
        
        var month_age = Math.floor(day_age/30);
        
        day_age = day_age % 30;
        
        if (isNaN(year_age) || isNaN(month_age) || isNaN(day_age)) {
            $("#exact_age").text("Invalid birthday - Please try again!");
        }
        else {
            $("#exact_age").html(getAge(new Date($("#birth_date").val()), new Date()));
        }
    });


  function getAge(date_1, date_2)
{
  
//convert to UTC
var date2_UTC = new Date(Date.UTC(date_2.getUTCFullYear(), date_2.getUTCMonth(), date_2.getUTCDate()));
var date1_UTC = new Date(Date.UTC(date_1.getUTCFullYear(), date_1.getUTCMonth(), date_1.getUTCDate()));


var yAppendix, mAppendix, dAppendix;


//--------------------------------------------------------------
var days = date2_UTC.getDate() - date1_UTC.getDate();
if (days < 0)
{

    date2_UTC.setMonth(date2_UTC.getMonth() - 1);
    days += DaysInMonth(date2_UTC);
}
//--------------------------------------------------------------
var months = date2_UTC.getMonth() - date1_UTC.getMonth();
if (months < 0)
{
    date2_UTC.setFullYear(date2_UTC.getFullYear() - 1);
    months += 12;
}
//--------------------------------------------------------------
var years = date2_UTC.getFullYear() - date1_UTC.getFullYear();




if (years > 1) yAppendix = " years";
else yAppendix = " year";
if (months > 1) mAppendix = " months";
else mAppendix = " month";
if (days > 1) dAppendix = " days";
else dAppendix = " day";

return "You are<br/><span id=\"age\">"+years + yAppendix + ", " + months + mAppendix + ", and " + days + dAppendix +" </span> old";
}

/*
Wrong age calculation issue fixed/updated javascript code 
By Rohit Kumar
https://www.iamrohit.in
https://youtube.com/AskRohit
*/

function DaysInMonth(date2_UTC)
{
var monthStart = new Date(date2_UTC.getFullYear(), date2_UTC.getMonth(), 1);
var monthEnd = new Date(date2_UTC.getFullYear(), date2_UTC.getMonth() + 1, 1);
var monthLength = (monthEnd - monthStart) / (1000 * 60 * 60 * 24);
return monthLength;
}

});
</script>
</body>
</html>"


"



* If You Fase Any Error, Please Do This - 
At First Copy This Code And Save In Notepad, And Open with Notepad++, Then Copy Code And Place in Theme.*



Step 10: currently your website is with success completed, afterward once traffic is coming to your website the acquisition a custom domain, then your {site|website|web website} can look as skilled and add some pages in your site and If you get AdSense approval, then you'll begin your earning by adding ads.


Step 11: currently View your Blog. It's able to Publish.






PLEASE SHARE THIS ARTICLE ON YOUR SOCIAL MEDIA PLATFORM TO KNOW OTHERS. IF YOU HAVE ANY QUERY PLEASE WRITE IN COMMENT BOX ........... THANK YOU FOR YOUR SUPPORT.





Post a Comment

0 Comments