<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Goru Mohd</title>
    <description>The latest articles on DEV Community by Goru Mohd (@goru_mohd_6616164f698e79c).</description>
    <link>https://dev.to/goru_mohd_6616164f698e79c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4005579%2F1e35546a-5cf2-44f4-8540-7f26503fff85.png</url>
      <title>DEV Community: Goru Mohd</title>
      <link>https://dev.to/goru_mohd_6616164f698e79c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/goru_mohd_6616164f698e79c"/>
    <language>en</language>
    <item>
      <title>How I Built a JavaScript Age Calculator in 2 Hours</title>
      <dc:creator>Goru Mohd</dc:creator>
      <pubDate>Sat, 27 Jun 2026 16:14:01 +0000</pubDate>
      <link>https://dev.to/goru_mohd_6616164f698e79c/how-i-built-a-javascript-age-calculator-in-2-hours-52og</link>
      <guid>https://dev.to/goru_mohd_6616164f698e79c/how-i-built-a-javascript-age-calculator-in-2-hours-52og</guid>
      <description>&lt;h2&gt;
  
  
  The Problem I Faced
&lt;/h2&gt;

&lt;p&gt;A few days ago, I needed to calculate someone's exact age in years, months, and days. I Googled "age calculator" and found:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complicated interfaces&lt;/li&gt;
&lt;li&gt;Required sign-up&lt;/li&gt;
&lt;li&gt;Not mobile-friendly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I decided to build my own.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I created &lt;strong&gt;&lt;a href="https://calchub-calculators.netlify.app/" rel="noopener noreferrer"&gt;calchub-calculators.netlify.app&lt;/a&gt;&lt;/strong&gt; - a free, simple, and clean age calculator.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features:
&lt;/h3&gt;

&lt;p&gt;✅ &lt;strong&gt;Exact age in years, months, and days&lt;/strong&gt;&lt;br&gt;
✅ &lt;strong&gt;Mobile responsive&lt;/strong&gt;&lt;br&gt;
✅ &lt;strong&gt;No sign-up required&lt;/strong&gt;&lt;br&gt;
✅ &lt;strong&gt;100% free forever&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The calculator takes your birth date as input, compares it with today's date, and gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your exact age in years&lt;/li&gt;
&lt;li&gt;How many months old you are&lt;/li&gt;
&lt;li&gt;How many days old you are&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It (Technical Details)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Tech Stack:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTML5&lt;/strong&gt; - Structure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS3&lt;/strong&gt; - Styling (clean, minimal design)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vanilla JavaScript&lt;/strong&gt; - Logic (no frameworks needed)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key JavaScript Function:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
function calculateAge(birthDate) {
    const today = new Date();
    let years = today.getFullYear() - birthDate.getFullYear();
    let months = today.getMonth() - birthDate.getMonth();
    let days = today.getDate() - birthDate.getDate();

    if (days &amp;lt; 0) {
        months--;
        days += new Date(today.getFullYear(), today.getMonth(), 0).getDate();
    }

    if (months &amp;lt; 0) {
        years--;
        months += 12;
    }

    return { years, months, days };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
