Skip to content

PratikCoreDev/modern-digital-clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ•’ Modern Digital Clock

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.


HTML5 CSS3 JavaScript Responsive License



๐Ÿ“– About

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.


โœจ Features

  • ๐Ÿ•’ 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

๐Ÿ“ธ Preview

๐Ÿ–ฅ๏ธ Desktop

Desktop Preview


๐Ÿ“ฑ Mobile

Mobile Preview

---

๐Ÿ› ๏ธ Tech Stack

Technology Purpose
HTML5 Structure
CSS3 Styling
JavaScript Dynamic Functionality
Google Fonts Typography

๐Ÿ“‚ Project Structure

Modern-Digital-Clock/
โ”‚
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ style.css
โ”œโ”€โ”€ script.js
โ”œโ”€โ”€ README.md
โ”‚
โ””โ”€โ”€ images/
    โ”œโ”€โ”€ desktop.png
    โ””โ”€โ”€ mobile.png

๐Ÿš€ Live Demo


โš™๏ธ Installation

Clone the repository

git clone https://github.com/PratikCoreDev/modern-digital-clock.git

Go to the project folder

cd modern-digital-clock

Open index.html

or use Live Server in Visual Studio Code.


โš™๏ธ How It Works

The application uses JavaScript's built-in Date API to retrieve the user's current system time and updates the interface every second.

Workflow

  1. Get the current date and time using new Date().
  2. Extract hours, minutes, seconds, day, month, and year.
  3. Format values using padStart() for consistent two-digit display.
  4. Display the formatted time and date on the webpage.
  5. Show a greeting based on the current hour.
  6. Refresh the clock every second using setInterval().

๐Ÿง  JavaScript Concepts Used

This project demonstrates several important JavaScript concepts.

๐Ÿ“… Date API

  • new Date()
  • getHours()
  • getMinutes()
  • getSeconds()
  • getDay()
  • getDate()
  • getMonth()
  • getFullYear()

๐Ÿ“„ DOM Manipulation

  • document.getElementById()
  • textContent

โฑ๏ธ Timers

  • setInterval()

๐Ÿ“ String Methods

  • padStart()
  • Template Literals

๐Ÿ”€ Conditional Statements

  • if
  • else if
  • else

Used to display greetings such as:

  • โ˜€๏ธ Good Morning
  • ๐ŸŒค Good Afternoon
  • ๐ŸŒ‡ Good Evening
  • ๐ŸŒ™ Good Night

๐ŸŽจ CSS Concepts Used

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

๐Ÿ“ฑ Responsive Design

The application is fully responsive and works seamlessly across different screen sizes.

Supported devices:

  • ๐Ÿ’ป Desktop
  • ๐Ÿ’ผ Laptop
  • ๐Ÿ“ฑ Mobile
  • ๐Ÿ“Ÿ Tablet

๐Ÿ“š What I Learned

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

๐Ÿš€ Future Improvements

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

โšก Performance

  • โœ… Lightweight
  • โœ… Fast Loading
  • โœ… No External Frameworks
  • โœ… Optimized JavaScript
  • โœ… Responsive Layout
  • โœ… Beginner Friendly

๐Ÿค Contributing

Contributions are welcome!

If you'd like to improve this project, follow these steps:

  1. Fork the repository.
  2. Create a new feature branch.
git checkout -b feature-name
  1. Commit your changes.
git commit -m "Add new feature"
  1. Push to your branch.
git push origin feature-name
  1. Open a Pull Request.

Every contribution is appreciated!


๐Ÿ“Œ Why I Built This Project

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

๐ŸŒŸ Project Highlights

โœ” Real-Time Clock

โœ” Dynamic Greeting System

โœ” Responsive Design

โœ” Glassmorphism UI

โœ” Modern Typography

โœ” Lightweight & Fast

โœ” Beginner Friendly

โœ” Clean Code Structure


๐Ÿ“œ License

This project is licensed under the MIT License.

Feel free to use, modify, and distribute this project for learning and educational purposes.


๐Ÿ™ Acknowledgements

Special thanks to:

  • Google Fonts
  • MDN Web Docs
  • JavaScript Documentation
  • CSS Tricks
  • Frontend Developer Community

These resources helped me while building this project.


๐Ÿ‘จโ€๐Ÿ’ป About the Developer

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.


๐Ÿ“ฌ Connect With Me

GitHub

https://github.com/PratikCoreDev


โญ Support

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.


๐Ÿš€ More Projects Coming Soon

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!


โญ If you like this project, don't forget to leave a Star!

Made with โค๏ธ by Pratik

Happy Coding! ๐Ÿš€

About

๐Ÿ•’ A modern and responsive Digital Clock built with HTML, CSS, and JavaScript featuring real-time updates, dynamic greetings, and a Glassmorphism-inspired UI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors