Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Clock Demo

A minimalistic live clock demo built with GitHub Pages. It dynamically displays the current time in hours, minutes, and seconds.(just for fun)


Live Demo

Check it out here: https://sameer4445.github.io/Digital_clock/

When opened, the page renders something like:

The time is now 00 Hours

00 Minutes

00 Seconds

yaml Copy Edit

(It updates in real-time to reflect your current local time.) :contentReference[oaicite:0]{index=0}


How It Works

  • The clock is implemented in plain HTML, CSS, and JavaScript.
  • JavaScript periodically fetches the current time (new Date()), parses hours, minutes, and seconds, then updates the elements on the page.
  • Likely uses setInterval() to refresh every second.

Getting Started

Prerequisites

  • A modern web browser (e.g., Chrome, Firefox, Edge, Safari).

Installation

To run the project locally:

  1. Clone the repository:
    git clone https://github.com/sameer4445/git.git
  2. Navigate into the project directory:
 cd git
  1. Open index.html in your browser—or use a local server:

live-server

Usage

The clock starts running immediately upon loading the page.

No interaction needed—time updates every second automatically.

Possible Enhancements Consider adding:

AM/PM toggle or 24-hour format switch

Handy date display (day, month, year)

Custom themes or time zones

Mobile-responsive styling

Ability to pause or reset the clock

Contributing Love this simple demo? Feel free to contribute! You can:

Tweak the styles or layout

Add new features like date-time toggles or timezone support

Improve accessibility or responsiveness

Just fork the repo, submit a pull request, and help make it shine brighter!

License

This project is released under the MIT License.

Summary

This project is a clean, straightforward example of a real-time clock using GitHub Pages. Its minimal code and function make it ideal for learning how JavaScript can interact with the DOM to deliver live updates. Let me know if you'd like an extended demo incorporating themes, toggles, or additional features—I’d be happy to help build it out!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages