A modern and responsive Digital Clock built using HTML, CSS, and JavaScript.
It displays the current time, date, and a dynamic greeting based on the user's local time with a beautiful Glassmorphism-inspired user interface.
The Modern Digital Clock is a clean and elegant frontend web application that displays the current time, date, and a greeting that changes automatically depending on the time of day.
The project was built to strengthen my understanding of JavaScript DOM Manipulation, Date API, Responsive Web Design, and modern CSS UI Design.
It updates automatically every second without refreshing the page, providing a smooth user experience.
- ๐ Live Digital Clock
- ๐ Current Date Display
- โ๏ธ Dynamic Greeting
- ๐ข Animated Live Status Indicator
- ๐ Time Zone Display
- โจ Glassmorphism UI
- ๐ Beautiful Gradient Background
- ๐ฑ Fully Responsive Design
- โก Real-Time Updates Every Second
- ๐จ Orbitron Digital Font
---
| Technology | Purpose |
|---|---|
| HTML5 | Structure |
| CSS3 | Styling |
| JavaScript | Dynamic Functionality |
| Google Fonts | Typography |
Modern-Digital-Clock/
โ
โโโ index.html
โโโ style.css
โโโ script.js
โโโ README.md
โ
โโโ images/
โโโ desktop.png
โโโ mobile.png
Clone the repository
git clone https://github.com/PratikCoreDev/modern-digital-clock.gitGo to the project folder
cd modern-digital-clockOpen index.html
or use Live Server in Visual Studio Code.
The application uses JavaScript's built-in Date API to retrieve the user's current system time and updates the interface every second.
- Get the current date and time using
new Date(). - Extract hours, minutes, seconds, day, month, and year.
- Format values using
padStart()for consistent two-digit display. - Display the formatted time and date on the webpage.
- Show a greeting based on the current hour.
- Refresh the clock every second using
setInterval().
This project demonstrates several important JavaScript concepts.
new Date()getHours()getMinutes()getSeconds()getDay()getDate()getMonth()getFullYear()
document.getElementById()textContent
setInterval()
padStart()- Template Literals
- if
- else if
- else
Used to display greetings such as:
- โ๏ธ Good Morning
- ๐ค Good Afternoon
- ๐ Good Evening
- ๐ Good Night
This project uses modern CSS features including:
- Flexbox
- Glassmorphism
- CSS Animations
- Keyframes
- Hover Effects
- Backdrop Filter
- Box Shadows
- Linear Gradients
- Media Queries
- Responsive Design
- Google Fonts
The application is fully responsive and works seamlessly across different screen sizes.
Supported devices:
- ๐ป Desktop
- ๐ผ Laptop
- ๐ฑ Mobile
- ๐ Tablet
Building this project helped me improve my understanding of:
- JavaScript Date API
- DOM Manipulation
- Dynamic Content Updates
- Responsive Web Design
- Modern CSS Layouts
- Glassmorphism UI
- CSS Animations
- Writing Clean and Maintainable Code
Some features I plan to add in future versions:
- ๐ Multiple Time Zones
- ๐ Dark / Light Mode
- โฐ Alarm Clock
- โฑ Stopwatch
- โ Countdown Timer
- ๐ Calendar Integration
- ๐ Time Zone Selector
- ๐จ Theme Customization
- ๐ Notification Support
- โ Lightweight
- โ Fast Loading
- โ No External Frameworks
- โ Optimized JavaScript
- โ Responsive Layout
- โ Beginner Friendly
Contributions are welcome!
If you'd like to improve this project, follow these steps:
- Fork the repository.
- Create a new feature branch.
git checkout -b feature-name- Commit your changes.
git commit -m "Add new feature"- Push to your branch.
git push origin feature-name- Open a Pull Request.
Every contribution is appreciated!
This project was created to practice and strengthen my frontend development skills by building a real-time web application.
While developing this project, I focused on:
- Writing clean and organized code
- Understanding JavaScript's Date API
- Manipulating the DOM dynamically
- Creating responsive layouts
- Designing a modern Glassmorphism interface
- Improving the overall user experience
โ Real-Time Clock
โ Dynamic Greeting System
โ Responsive Design
โ Glassmorphism UI
โ Modern Typography
โ Lightweight & Fast
โ Beginner Friendly
โ Clean Code Structure
This project is licensed under the MIT License.
Feel free to use, modify, and distribute this project for learning and educational purposes.
Special thanks to:
- Google Fonts
- MDN Web Docs
- JavaScript Documentation
- CSS Tricks
- Frontend Developer Community
These resources helped me while building this project.
Hi, I'm Pratik ๐
I'm an aspiring Frontend Developer passionate about building modern, responsive, and user-friendly web applications.
I enjoy learning new technologies and continuously improving my development skills by creating practical projects.
https://github.com/PratikCoreDev
If you found this project helpful or interesting,
please consider:
โญ Starring the repository
๐ด Forking the repository
๐ Sharing your feedback
Every bit of support motivates me to build more amazing projects.
Some projects I'm currently working on:
- ๐ค Weather App
- ๐ฐ Expense Tracker
- ๐ Notes App
- ๐ต Music Player
- ๐ Portfolio Website
- ๐ฎ Minecraft Server Lists
- ๐ Dashboard UI
- ๐ More Frontend Projects
Stay tuned!

