diff --git a/src/pystatis/table.py b/src/pystatis/table.py index 78da517..778e6dd 100644 --- a/src/pystatis/table.py +++ b/src/pystatis/table.py @@ -154,7 +154,9 @@ def get_data( decimal="," if language == "de" else ".", dtype={raw_data_header.split(";")[pos + 2]: str for pos in pos_of_ags_col}, parse_dates=[config.LANG_TO_COL_MAPPING[db_version][language]["time"]], - date_format="%d.%m.%Y" if language == "de" else "%Y-%m-%d", + date_format="%d.%m.%Y" + if (language == "de" and db_name == "regio") + else "%Y-%m-%d", ) if prettify: diff --git a/tests/test_table.py b/tests/test_table.py index 720a675..093d140 100644 --- a/tests/test_table.py +++ b/tests/test_table.py @@ -746,7 +746,18 @@ def test_prettify( @pytest.mark.vcr() @pytest.mark.parametrize( "table_name, time_col, language", - [("12411-01-01-4", "Stichtag", "de"), ("12411-01-01-4", "Stichtag", "en")], + [ + ("12411-01-01-4", "Stichtag", "de"), + ("12411-01-01-4", "Stichtag", "en"), + ("13111-0005", "Stichtag", "de"), + ("13111-0005", "Reference date", "en"), + ("71311-0001", "Stichtag zum Quartalsende", "de"), + ("71311-0001", "Reference date end-of-quarter", "en"), + ("1000A-0000", "Stichtag", "de"), + ("1000A-0000", "Reference date", "en"), + ("2000S-2003", "Stichtag", "de"), + ("2000S-2003", "Reference date", "en"), + ], ) def test_dtype_time_column(mocker, table_name: str, time_col: str, language: str): mocker.patch.object(pystatis.db, "check_credentials", return_value=True)