from tkinter import *
from datetime import datetime
from tk_tools import *
from time import sleep as wait
root = Tk()
root.config(bg='black')
root.title('Time Circuits')
def add_labels(offset):
    Label(root, text="MONTH", background="black", foreground="white", font=("Segoe UI", 25)).grid(column=1, row=0+offset)
    Label(root, text="DAY", background="black", foreground="white", font=("Segoe UI", 25)).grid(column=2, row=0+offset)
    Label(root, text="YEAR", background="black", foreground="white", font=("Segoe UI", 25)).grid(column=3, row=0+offset)
    Label(root, text="HOUR", background="black", foreground="white", font=("Segoe UI", 25)).grid(column=4, row=+offset)
    Label(root, text="MIN", background="black", foreground="white", font=("Segoe UI", 25)).grid(column=6, row=0+offset)
add_labels(0)
Label(root, text="NOV", background="black", foreground="red", font=("Segoe UI Light", 75)).grid(column=1, row=1)
Disp1 = SevenSegmentDigits(root, digits=2, digit_color='red', background='black', height=100)
Disp1.grid(column=2, row=1)
Disp2 = SevenSegmentDigits(root, digits=4, digit_color='red', background='black', height=100)
Disp2.grid(column=3, row=1)
Disp3 = SevenSegmentDigits(root, digits=2, digit_color='red', background='black', height=100)
Disp3.grid(column=4, row=1)
Label(root, text=":", background="black", foreground="white", font=("Segoe UI", 50)).grid(column=5, row=1)
Disp4 = SevenSegmentDigits(root, digits=2, digit_color='red', background='black', height=100)
Disp4.grid(column=6, row=1)
Label(root, text="DESTINATION TIME", background="black", foreground="white", font=("Segoe UI", 25)).grid(column=3, row=2)
Disp1.set_value('05')
Disp2.set_value('1955')
Disp3.set_value('01')
Disp4.set_value('21')
root.config(bg='black')
add_labels(3)
month = Label(root, text="", background="black", foreground="#00ff00", font=("Segoe UI Light", 75))
month.grid(column=1, row=4)
Disp5 = SevenSegmentDigits(root, digits=2, digit_color='#00ff00', background='black', height=100)
Disp5.grid(column=2, row=4)
Disp6 = SevenSegmentDigits(root, digits=4, digit_color='#00ff00', background='black', height=100)
Disp6.grid(column=3, row=4)
Disp7 = SevenSegmentDigits(root, digits=2, digit_color='#00ff00', background='black', height=100)
Disp7.grid(column=4, row=4)
Label(root, text=":", background="black", foreground="white", font=("Segoe UI", 50)).grid(column=5, row=4)
Disp8=SevenSegmentDigits(root, digits=2, digit_color='#00ff00', background='black', height=100)
Disp8.grid(column=6, row=4)
Label(root, text="PRESENT TIME", background="black", foreground="white", font=("Segoe UI", 25)).grid(column=3, row=5)
root.config(bg='black')
add_labels(6)
Label(root, text="OCT", background="black", foreground="yellow", font=("Segoe UI Light", 75)).grid(column=1, row=7)
Disp9 = SevenSegmentDigits(root, digits=2, digit_color='yellow', background='black', height=100)
Disp9.grid(column=2, row=7)
Disp10 = SevenSegmentDigits(root, digits=4, digit_color='yellow', background='black', height=100)
Disp10.grid(column=3, row=7)
Disp11 = SevenSegmentDigits(root, digits=2, digit_color='yellow', background='black', height=100)
Disp11.grid(column=4, row=7)
Label(root, text=":", background="black", foreground="white", font=("Segoe UI", 50)).grid(column=5, row=7)
Disp12 = SevenSegmentDigits(root, digits=2, digit_color='yellow', background='black', height=100)
Disp12.grid(column=6, row=7)
Label(root, text="LAST TIME DEPARTED", background="black", foreground="white", font=("Segoe UI", 25)).grid(column=3, row=8)
Disp9.set_value('26')
Disp10.set_value('1985')
Disp11.set_value('01')
Disp12.set_value('20')
while True:
    try:
        d=datetime.now()
        month.config(text=d.strftime('%b').upper())
        Disp5.set_value(d.strftime('%d'))
        Disp6.set_value(d.strftime('%Y'))
        Disp7.set_value(d.strftime('%H'))
        Disp8.set_value(d.strftime('%M'))
        root.update()
        wait(0.01)
    except:
        break
