HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/faker/providers/date_time/hr_HR/__init__.py
from .. import Provider as DateTimeProvider


class Provider(DateTimeProvider):
    def day_of_week(self) -> str:
        day = self.date("%w")
        DAY_NAMES = {
            "0": "Nedjelja",
            "1": "Ponedjeljak",
            "2": "Utorak",
            "3": "Srijeda",
            "4": "Četvrtak",
            "5": "Petak",
            "6": "Subota",
        }
        return DAY_NAMES[day]

    def month_name(self) -> str:
        month = self.month()
        MONTH_NAMES = {
            "01": "Siječanj",
            "02": "Veljača",
            "03": "Ožujak",
            "04": "Travanj",
            "05": "Svibanj",
            "06": "Lipanj",
            "07": "Srpanj",
            "08": "Kolovoz",
            "09": "Rujan",
            "10": "Listopad",
            "11": "Studeni",
            "12": "Prosinac",
        }
        return MONTH_NAMES[month]