to_passive_voice / modules /m_datetime.py
nanom's picture
Improvements
0a0a388
raw
history blame contribute delete
472 Bytes
import pytz
from datetime import datetime
class Datetime:
def __init__(
self,
zone: str = "America/Argentina/Cordoba"
) -> None:
self.time_zone = pytz.timezone(zone)
def full(
self
) -> str:
now = datetime.now(self.time_zone)
return now.strftime("%H:%M:%S %d-%m-%Y")
def day(
self
) -> str:
now = datetime.now(self.time_zone)
return now.strftime("%d-%m-%Y")