ssot-live/utils/date_utils.py
2026-07-09 01:02:14 +00:00

11 lines
No EOL
304 B
Python

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)