Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
6
Comments
3

Tridwan

@iamtridwanLagos205 points

Geek developer (Something for the road)

Latest solutions

  • E-commerce single page

    #accessibility

    Tridwan•205
    Submitted over 1 year ago

    0 comments
  • Javascript Date object and input validation

    #accessibility

    Tridwan•205
    Submitted over 1 year ago

    0 comments
  • Rockpaperscissors game (bonus version)


    Tridwan•205
    Submitted almost 4 years ago

    1 comment
  • Responsive landing page made with HTML, CSS and JavaScript


    Tridwan•205
    Submitted about 4 years ago

    1 comment
  • Simple web calculator using HTML, CSS and JavaScript


    Tridwan•205
    Submitted about 4 years ago

    1 comment
  • Responsive project tra landing page made with HTML, CSS and JavaScript


    Tridwan•205
    Submitted about 4 years ago

    0 comments

Latest comments

  • Gift Amachree•870
    @jen67
    Submitted over 1 year ago

    Responsive age calculator app with html, css and javaScript

    3
    Tridwan•205
    @iamtridwan
    Posted over 1 year ago

    Hi @jen67! I just went through your project now (both the live deployment and code)and i must say you really nailed it in the aspect of design specification as well as responsiveness. Great job. One thing i noticed tho, is with the functionality with the calculations. whenever i enter a date i get this continous calculation of number, which inturn makes the whole UI glitching giving a bad experience. A way to resolve this issue is to address the calculations for the age. one way to do that is as follows

    1. since we have the current date and the inputted date we can just convert them to milliseconds and get thier difference. below is a sample code
    let ageInMilSec = new Date().getTime() - new Date(inputedDate).getTime()
    

    the getTime method of the date object returning time in milliseconds 2. calculate the number of years in the remaining milliseconds. this can be done like so

    const years = Math.Floor(ageInMilSec / 31556952000)
    

    since there are 31,556,952,000 in a year. 3. calculate for the month as so:

    const month = Math.floor((ageInMilSec % 31556952000) / 2629746000) 
    

    what we did was divide the remainder from what we got by dividing the age in milliseconds by the total miiliseconds in a year, by the milliseconds in a month 4. you can get that of the day by doing so

    const day = Math.floor(((ageInMilSec % 31556952000) % 2629746000) / 86400000)
    

    there are 86,400,000 in a day. so what we did was divide the result we get from the remainder of month divided by its own milliseconds. Hope this helps. if you have any further assistance or question you can reachout to me on @iamtridwan on X.

    Marked as helpful
  • Laryea Laryea•110
    @LaryeaNii
    Submitted over 1 year ago

    Age Calculator App

    #svelte#vite
    2
    Tridwan•205
    @iamtridwan
    Posted over 1 year ago

    Hi @LARYEA LARYEA, great work you've done. i love how you worked on the implementation for validating the input fields for the month and days. I think there can be improvement tho, most especially in the area of calculating the age. you can simply do this by using using the code snippet.

    const timeDiffInMil = new Date().getTime() - new Date(forminputs).getTime()
    const years = Math.floor(timeDiffInMil / 31556952000);
    const month = Math.floor((timeDiffInMil % 31556952000) / 2629746000)
    const days = Math.floor(((timeDiffInMil % 31556952000) % 2629746000) / 86400000)
    

    This is an explanation of the code

    1. Get the difference in milliseconds between todays date and the input value of users. 2.calculate for the number of years by dividing the difference with 31556952000 which is the total milliseconds in a year and round it up to the nearest whole number(i.e math.floor)
    2. calculate for the month by dividing the remainder from the calculation of step above with 2629746000 which is the number of milliseconds in a month and rounding it off as well
    3. lastly we calculated the number of days by dividing the remainder gotten from the step above by 86400000 and the round it up. Hope this help. You can reachout to me if you need any assistance on X @iamtridwan
  • A.K. Afiq•325
    @akaahl
    Submitted about 4 years ago

    ReactJS, Styled Components and MathJS.

    4
    Tridwan•205
    @iamtridwan
    Posted about 4 years ago

    Good job here. But I noticed the display for mobile is not suited for mobile devices. You could set the width using media query like so wrapper{ width:90%; margin: 10px auto; } the wrapper is the container for the calculator itself. Moreso the margin top and bottom could be optional or may be set to zero.

    Marked as helpful

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub