datetime_functions.py 288 B

123456789101112
  1. import datetime
  2. def get_calendarweek_from_datetime(datetime_obj):
  3. return datetime_obj.strftime('%V')
  4. def get_current_date():
  5. return datetime.date.today()
  6. def get_current_month_year_as_str():
  7. current_date = datetime.datetime.now()
  8. return current_date.strftime("%m/%Y")