etender_service.py
665 Bytes
# -*- coding: utf-8 -
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(tender_data):
tender_data.data.procuringEntity['name'] = u"Повна назва невідомо чого"
return tender_data