Source code for cata_log_hub.providers.regions

# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Cata-Log - the central hub for digital flyers
# Copyright (C) 2026 David Aderbauer & The Cata-Log Contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

import abc
import zoneinfo

from cata_log_hub.constants import WeekCountingStartpoints


[docs] class Region(abc.ABC): """Base region class.""" local_name: str week_counting_startpoint: WeekCountingStartpoints timezone: zoneinfo.ZoneInfo language_code: str is_rtl: bool = False
[docs] class Germany(Region): """Region class for germany.""" week_counting_startpoint = WeekCountingStartpoints.MONDAY timezone = zoneinfo.ZoneInfo("Europe/Berlin") language_code = "de" local_name = "Deutschland"
[docs] class Austria(Germany): """Region class for austria.""" local_name = "Österreich" timezone = zoneinfo.ZoneInfo("Europe/Vienna")
[docs] class Italy(Region): """Region class for italy.""" week_counting_startpoint = WeekCountingStartpoints.MONDAY timezone = zoneinfo.ZoneInfo("Europe/Rome") language_code = "it" local_name = "Italia"