DEV Community

huali
huali

Posted on

How I Built a 100% Client-Side Date Calculator with Vanilla JS

Hey Devs! 👋

I recently built a simple Date Calculator as a side project. I wanted something completely free, requiring no sign-up, and running 100% client-side so no user data ever hits a server.

Tech Stack:

  • Pure Vanilla HTML/CSS/JS (No React, no build tools)
  • Browser's native Date object for leap-year accurate math
  • Hosted on Cloudflare Pages

The most challenging part was dealing with time zones and making sure the difference between two dates was absolute. Using Date.UTC() solved this perfectly.

If you want to check it out, you can try it here: https://app.lihayo.com/date-calculator/

Let me know what you think! Feedback is always welcome. 🚀

Top comments (0)