etender_service.py
667 Bytes
from iso8601 import parse_date
def convert_date_to_etender_format(isodate):
iso_dt = parse_date(isodate)
date_string = iso_dt.strftime("%d-%m-%Y")
return date_string
def convert_datetime_for_delivery(isodate):
iso_dt = parse_date(isodate)
date_string = iso_dt.strftime("%Y-%m-%d %H:%M")
return date_string
def convert_time_to_etender_format(isodate):
iso_dt = parse_date(isodate)
time_string = iso_dt.strftime("%H:%M")
return time_string
def procuring_entity_name(INITIAL_TENDER_DATA):
INITIAL_TENDER_DATA.data.procuringEntity['name'] = u"Повна назва невідомо чого"
return INITIAL_TENDER_DATA