diff --git a/src/pricehist/isocurrencies.py b/src/pricehist/isocurrencies.py index fe02678..550db3a 100644 --- a/src/pricehist/isocurrencies.py +++ b/src/pricehist/isocurrencies.py @@ -24,6 +24,7 @@ Functions: """ from dataclasses import dataclass, field +from datetime import datetime from importlib.resources import read_binary from typing import List @@ -44,7 +45,9 @@ class ISOCurrency: def current_data_date(): one = etree.fromstring(read_binary("pricehist.resources", "list_one.xml")) - return one.cssselect("ISO_4217")[0].attrib["Pblshd"] + pblshd = one.cssselect("ISO_4217")[0].attrib["Pblshd"] + date = datetime.strptime(pblshd, "%B %d, %Y").date().isoformat() + return date def historical_data_date(): diff --git a/src/pricehist/resources/list_one.xml b/src/pricehist/resources/list_one.xml index 20be53b..7bc46c2 100644 --- a/src/pricehist/resources/list_one.xml +++ b/src/pricehist/resources/list_one.xml @@ -1,5 +1,5 @@ - + AFGHANISTAN @@ -1819,6 +1819,13 @@ 928 2 + + VENEZUELA (BOLIVARIAN REPUBLIC OF) + BolĂ­var Soberano + VED + 926 + 2 + VIET NAM Dong