From 827dd1b0448517dcbc83e0a8be439caf0a92f94b Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 11 Jun 2024 01:58:26 -0700 Subject: [PATCH] refac --- src/lib/components/workspace/Tools/CodeEditor.svelte | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/components/workspace/Tools/CodeEditor.svelte b/src/lib/components/workspace/Tools/CodeEditor.svelte index 13a59fd32..064115474 100644 --- a/src/lib/components/workspace/Tools/CodeEditor.svelte +++ b/src/lib/components/workspace/Tools/CodeEditor.svelte @@ -36,13 +36,17 @@ class Tools: def get_current_time(self) -> str: """ - Get the current time. + Get the current time in a more human-readable format. :return: The current time. """ now = datetime.now() - current_time = now.strftime("%H:%M:%S") - return f"Current Time = {current_time}" + current_time = now.strftime("%I:%M:%S %p") # Using 12-hour format with AM/PM + current_date = now.strftime( + "%A, %B %d, %Y" + ) # Full weekday, month name, day, and year + + return f"Current Date and Time = {current_date}, {current_time}" def calculator(self, equation: str) -> str: """