Design Architecture for Utility Functions #2

Open
forge-bot wants to merge 9 commits from forge/iss-1ac610bafd4c into main
Showing only changes of commit f4d0a9ddf4 - Show all commits

11
utils/date_utils.py Normal file
View file

@ -0,0 +1,11 @@
from datetime import datetime
def get_current_date():
"""Returns the current date as a string in YYYY-MM-DD format."""
return datetime.now().strftime('%Y-%m-%d')
def format_date(date, format='%Y-%m-%d'):
"""Formats a given date to the specified format."""
return date.strftime(format)