[+] Time icon
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
from datetime import datetime
|
||||
|
||||
def get_unicode_time_icon():
|
||||
# Get the current hour in 12-hour format
|
||||
current_hour = datetime.now().strftime("%I") # '%I' gives the hour in 12-hour format
|
||||
|
||||
unicode_icons = {
|
||||
'01': '',
|
||||
'02': '',
|
||||
'03': '',
|
||||
'04': '',
|
||||
'05': '',
|
||||
'06': '',
|
||||
'07': '',
|
||||
'08': '',
|
||||
'09': '',
|
||||
'10': '',
|
||||
'11': '',
|
||||
'12': '',
|
||||
}
|
||||
|
||||
# Return the icon for the current hour
|
||||
return unicode_icons.get(current_hour)
|
||||
|
||||
# Example usage
|
||||
print(get_unicode_time_icon())
|
||||
Reference in New Issue
Block a user