mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
extract leading zero from date
This commit is contained in:
parent
3b3c6c3cc4
commit
298bb5a148
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ BASE_ENERGY_URL = "https://find-energy-certificate.service.gov.uk"
|
||||||
def calculate_expiry_date(lodgement_date):
|
def calculate_expiry_date(lodgement_date):
|
||||||
lodgement_date_dt = datetime.strptime(lodgement_date, '%Y-%m-%d')
|
lodgement_date_dt = datetime.strptime(lodgement_date, '%Y-%m-%d')
|
||||||
expiry_date_dt = lodgement_date_dt + relativedelta(years=10) - timedelta(days=1)
|
expiry_date_dt = lodgement_date_dt + relativedelta(years=10) - timedelta(days=1)
|
||||||
return expiry_date_dt.strftime('%d %B %Y')
|
return expiry_date_dt.strftime('%-d %B %Y')
|
||||||
|
|
||||||
|
|
||||||
def retrieve_find_my_epc_data(uprn: int, postcode: str, address: str, expected_expiry_date: str):
|
def retrieve_find_my_epc_data(uprn: int, postcode: str, address: str, expected_expiry_date: str):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue