https://github.com/prathamesh2911/digital_clock
Created a simple digital clock application using Tkinter, a GUI toolkit in Python.
https://github.com/prathamesh2911/digital_clock
clock digitalclock python3 strftime tkinter
Last synced: about 1 year ago
JSON representation
Created a simple digital clock application using Tkinter, a GUI toolkit in Python.
- Host: GitHub
- URL: https://github.com/prathamesh2911/digital_clock
- Owner: Prathamesh2911
- Created: 2024-10-29T06:20:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-14T14:52:06.000Z (about 1 year ago)
- Last Synced: 2025-02-14T15:40:47.423Z (about 1 year ago)
- Topics: clock, digitalclock, python3, strftime, tkinter
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Digital Clock
This code creates a simple digital clock application using Tkinter, a GUI toolkit in Python. Here’s a summary of its main components:
## Components
- **Imports**: The code imports necessary modules from Tkinter and the `strftime` function from the time module.
- **Window Setup**: A main window (`root`) is created with a title "Clock" and a black background.
- **Time Function**: The `time` function fetches the current time in the format "HH:MM:SS AM/PM" and updates a label every second.
- **Date Function**: The `date` function retrieves the current date in the format "DD/Mon/YYYY" and updates a label every 24 hours.
- **Day Function**: The `day` function gets the current day of the week (e.g., Monday) and updates a label every 24 hours.
- **Labels**: Three labels are created to display the time, date, and day of the week, styled with specific fonts and colors.
- **Main Loop**: The `mainloop()` function starts the Tkinter event loop, allowing the window to remain open and responsive.
## Features
- Displays current time, date, and day.
- Customizable appearance.
## Requirements
- Python 3.x
- Tkinter (included with most Python installations)
## Output
