Skip to content

celalce/clock-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Modern Digital Clock

A sleek, responsive digital clock application built with vanilla JavaScript, HTML5, and CSS3. This project demonstrates real-time DOM manipulation and asynchronous execution logic.

Digital Clock Preview

๐Ÿš€ Features

  • Asynchronous Time Updates: Utilizes JavaScript's setInterval to handle real-time clock synchronization without blocking the main thread.
  • Dynamic Formatting: Implements logic to ensure a consistent HH:MM:SS format using string padding.
  • Neon UI Design: A modern dark-mode aesthetic with CSS glow effects and responsive Flexbox centering.
  • Lightweight: Built with zero external dependencies or libraries.

๐Ÿ› ๏ธ Tech Stack

  • HTML5: Semantic structure for the clock container.
  • CSS3: Custom styling featuring neon glow effects, transitions, and flexible layouts.
  • JavaScript (ES6+): Core logic focused on the Date object and asynchronous UI updates.

๐Ÿ“– How It Works

The application uses an asynchronous approach to keep the time accurate:

  1. The Loop: A setInterval function triggers every 1000ms (1 second).
  2. Data Fetching: The script captures the current system time using the new Date() constructor.
  3. UI Sync: The DOM is updated dynamically, ensuring the user sees the latest time instantly without a page refresh.

๐Ÿ”ง Installation & Usage

  1. Clone this repository:
    git clone [https://github.com/celalce/clock-javascript.git](https://github.com/celalce/clock-javascript.git)
  2. Open the project folder:
    cd clock-javascript
  3. Launch clock.html in any modern web browser.

๐Ÿ‘ค Author

Celal Albayrak

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors