Press "Enter" to skip to content

JavaScript: Calculate Month and Year from Minutes

Using JavaScript, calculates month and year from given minutes and the approximate total waste time in your life.

Calculate your Waste Time, Make more Free Time

This is a time calculator which calculate total time of specific day-to-day activities. The main aim of this calculator is to aware the waste of precious time and the value of the time and life.


Enter an estimated time that you spend for a purpose evey day (Example: Facebook)

Time: Minutes


<div dir="ltr" style="text-align: left;" trbidi="on">

<table border="1" style="border-collapse: collapse;">
<td bgcolor="#D2D2D2" width="100%">  
 <script type="text/JavaScript">
 function setd() { 
  defaultval= 0
document.getElementById('Hrs').innerHTML = defaultval;
  function calculateArea(timet) { 
  a = timet%timet;
  if (a !=0) throw "Invalid time";
  hourseInMonth= ((timet*30)/60).toFixed(2)
  daysinmonth = (hourseInMonth/24).toFixed(2)
  hourseinyear = ((hourseInMonth)*12).toFixed(2)
  daysinyear = ((daysinmonth)*12).toFixed(2)
  hourseinlife = (hourseinyear*60).toFixed(2)
  daysinlife = (daysinyear*60).toFixed(2)
  yearsinlife = (daysinlife/365).toFixed(2)
  newtime =  "<font size=5>"+timet +" minutes is equal to:</font> <u><font size=5><br/> <br/><b>In a Month</b></font></u><br/></br>"+ hourseInMonth+" Hours<br />"+
  daysinmonth + "<font size=5> Days</font><u><font size=5><br/> <br/><b>In an Year</b></font></u><br/></br>"+
  hourseinyear +"<font size=5> hours </font><br/> "+
  daysinyear+"<font size=5> Days </font><br /> "+
  "<u><font size=5><br/><b>If your live 60 years, then</b></font></u></br><br/>"+
  hourseinlife +"<font size=5> hours </font><br/> "+
  daysinlife+"<font size=5> Days </font><br /> "+
  yearsinlife+"<font size=5> Years</font><br /> <br />"+
  "Wow..!! You spend (may waste) " + yearsinlife + " years in your 60 years (approximate) of life..!!";
document.getElementById('Hrs').innerHTML = newtime;  
catch(err )

 <body onload="set()">
<h1 align="center">
<form align="center" id="frmfrm" name="frm">
                <span style="font-size: xx-small;"><span style="font-size: medium;">Enter an estimated time that you spend for a purpose evey day (Example: Facebook)</span></span><br /><br /><br />     
                Time: <input name="time" size="5" type="text" />Minutes<br /><br />
  <input onclick="calculateArea(frm.time.value)" type="button" value="Calculate" />                                             
        <br /> 
  <h2 align="center">
<label id="Hrs"></label>&nbsp;    </h2>


Time is Precious 

Everyone know, the time is precious.. But we are wasting our precious time by chatting, gaming, surfing internet etc. Why we do not utilize our precious time for better activities?

Precious time calculator JavaScript: Calculate Month and Year from Minutes

In above calculator, you can calculate estimated time that you spend every day for many purposes. That may be good or bad activities. I am not saying the Facebook or WhatsApp chatting is fully bad or wasteful. But we are not aware of value of the time. If you spend 2 hours for WhatsApp chatting every day, then you spend about 5 full days of time from your life (if your age is 60), that is about 8% percentage of your life.

Some of wasteful activities(may not be in your case):

  • Social networking like Facebook, WhatsApp, YouTube etc 
  • Chatting 
  • Useless internet surfing
  • Gaming 
  • Over rest and over sleeping 

Just take every item from above list, calculate the total estimated time with above calculator, then sum them. Then you can find the total waste or useless time in your life. I have heard many are saying life is for enjoying, or enjoying the life maximum, I can’t support those arguments. Because, the enjoyment is more attached to personal interest or selfie. While enjoying our life, we cannot think affair or status of poor people around the world. You know the time is not only for enjoyment but you have to utilize your precious time with useful activities to yourself, to your family, to your society or even to entire world.

That may be:

  • Reading 
  • Feeding poor people 
  • Visit patients 
  • Care parents 
  • Teaching 
  • Helping 
  • Farming 
  • Cleaning 
  • Practice different abilities 
  • Leaning different new knowledge, new languages etc 
  • Earning by doing some extra works 
  • Praying 
  • Researching 

If scientist were not researched, then can we use this computer or mobile phone? They spent their time with research, so they could gave great contributions to the world. Like this, we have to give something to this world at least to our society.

Let us stop wasting time and try to make a difference in our life. Think life it not for waste, there are many meaning inside of our life. If we can’t do anything to this society, then who know our life? Just someone birth in a day and dies in another day, nothing other than it. None knows.

If you follow these 4 points, then your life will be success

  1. Be patient always like a donkey (not a fun) 
  2. Hard work like crow does. 
  3. Make a time table for next day at night every day. 
  4. Don’t sleep without completing the time table. 

Think what can we do with our life..? Make life meaningful.. Never waste time even a minute. Time is precious..

Wish you a successful life 

Be First to Comment

Leave a Reply