Это это то, что у меня есть сейчас:
Код: Выделить всё
def timestamp(*date: Union[datetime, str, int]) -> int | Tuple[int, ...]:
"""
It converts a date to a timestamp
:param date: The date to be converted to timestamp
:return: The number of seconds since the epoch.
"""
if len(date) == 1: return timestamp_(date[0])
return tuple([timestamp_(d) for d in date])
Подробнее здесь: https://stackoverflow.com/questions/776 ... nd-returns